mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-15 01:23:14 -07:00
Only send redirects to the sending InetAddress and only in response to a set of certain frame types to avoid potential race conditions.
This commit is contained in:
parent
8bfb02ba3c
commit
98d856daa2
3 changed files with 62 additions and 59 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue