Fix for GitHub issue #35 and also possibly partial fix for #29 issues.

This commit is contained in:
Adam Ierymenko 2014-01-28 16:12:24 -08:00
parent 8b65b3e6d7
commit d6a346ca6e
3 changed files with 90 additions and 74 deletions

View file

@ -294,6 +294,20 @@ public:
return InetAddress();
}
/**
* Forget direct paths
*
* @param fixedToo If true, also forget 'fixed' paths.
*/
inline void forgetDirectPaths(bool fixedToo)
throw()
{
if ((fixedToo)||(!_ipv4p.fixed))
_ipv4p.addr.zero();
if ((fixedToo)||(!_ipv6p.fixed))
_ipv6p.addr.zero();
}
/**
* @return 256-bit secret symmetric encryption key
*/
@ -411,6 +425,7 @@ public:
return (p - startAt);
}
private:
/**
* A direct IP path to a peer