mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-06 04:51:46 -07:00
More refactoring to clean up code, and add a gate function to make sure we do not handle OK packets we did not expect. This hardens up a few potential edge cases around security, since such messages might be used to e.g. pollute a cache and DOS under certain conditions.
This commit is contained in:
parent
16df2c3363
commit
0d4109a9f1
13 changed files with 170 additions and 83 deletions
|
@ -257,6 +257,12 @@ public:
|
|||
*/
|
||||
bool gate(const SharedPtr<Peer> &peer,const Packet::Verb verb,const uint64_t packetId);
|
||||
|
||||
/**
|
||||
* @param peer Peer to check
|
||||
* @return True if peer has recently been a valid member of this network
|
||||
*/
|
||||
bool recentlyAllowedOnNetwork(const SharedPtr<Peer> &peer) const;
|
||||
|
||||
/**
|
||||
* Perform cleanup and possibly save state
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue