diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-26 17:58:51 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-26 17:58:51 -0700 |
| commit | 98d856daa2488d3589cba058ec2d74e41dc53287 (patch) | |
| tree | b14e88d5bba35f592c6df2b70fb766a5a6343cf5 /node/Cluster.hpp | |
| parent | 8bfb02ba3cf87db37803a87dff0fa7af137944a9 (diff) | |
| download | infinitytier-98d856daa2488d3589cba058ec2d74e41dc53287.tar.gz infinitytier-98d856daa2488d3589cba058ec2d74e41dc53287.zip | |
Only send redirects to the sending InetAddress and only in response to a set of certain frame types to avoid potential race conditions.
Diffstat (limited to 'node/Cluster.hpp')
| -rw-r--r-- | node/Cluster.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/node/Cluster.hpp b/node/Cluster.hpp index be346659..b1266f27 100644 --- a/node/Cluster.hpp +++ b/node/Cluster.hpp @@ -247,12 +247,13 @@ public: /** * Redirect this peer to a better cluster member if needed * - * @param peerAddress Peer to (possibly) redirect + * @param peer Peer to (possibly) redirect + * @param localAddress Local address for path or NULL for none/any * @param peerPhysicalAddress Physical address of peer's current best path (where packet was most recently received or getBestPath()->address()) * @param offload Always redirect if possible -- can be used to offload peers during shutdown * @return True if peer was redirected */ - bool redirectPeer(const Address &peerAddress,const InetAddress &peerPhysicalAddress,bool offload); + bool redirectPeer(const SharedPtr<Peer> &peer,const InetAddress &localAddress,const InetAddress &peerPhysicalAddress,bool offload); /** * Fill out ZT_ClusterStatus structure (from core API) |
