mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 05:13:58 -07:00
Add confirmation step to new netconf, with the caveat that it will be disabled for older netconf servers to avoid race. Also add some comments.
This commit is contained in:
parent
afea153a0b
commit
0b84c10ccc
5 changed files with 75 additions and 9 deletions
|
@ -341,6 +341,32 @@ public:
|
|||
inline unsigned int remoteVersionMinor() const throw() { return _vMinor; }
|
||||
inline unsigned int remoteVersionRevision() const throw() { return _vRevision; }
|
||||
|
||||
/**
|
||||
* Check whether this peer's version is both known and is at least what is specified
|
||||
*
|
||||
* @param major Major version to check against
|
||||
* @param minor Minor version
|
||||
* @param rev Revision
|
||||
* @return True if peer's version is at least supplied tuple
|
||||
*/
|
||||
inline bool atLeastVersion(unsigned int major,unsigned int minor,unsigned int rev)
|
||||
throw()
|
||||
{
|
||||
if ((_vMajor > 0)||(_vMinor > 0)||(_vRevision > 0)) {
|
||||
if (_vMajor > major)
|
||||
return true;
|
||||
else if (_vMajor == major) {
|
||||
if (_vMinor > minor)
|
||||
return true;
|
||||
else if (_vMinor == minor) {
|
||||
if (_vRevision >= rev)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool remoteVersionKnown() const throw() { return ((_vMajor > 0)||(_vMinor > 0)||(_vRevision > 0)); }
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue