From 98d856daa2488d3589cba058ec2d74e41dc53287 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 26 Oct 2015 17:58:51 -0700 Subject: Only send redirects to the sending InetAddress and only in response to a set of certain frame types to avoid potential race conditions. --- node/Cluster.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'node/Cluster.hpp') 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,const InetAddress &localAddress,const InetAddress &peerPhysicalAddress,bool offload); /** * Fill out ZT_ClusterStatus structure (from core API) -- cgit v1.2.3