diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-01-28 16:12:24 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-01-28 16:12:24 -0800 |
commit | d6a346ca6e45c1735a991521ebc4b7c9405abf7e (patch) | |
tree | e987ecf62fde1b2546e2e9049d9cee0b36cdef5d /node/Peer.hpp | |
parent | 8b65b3e6d78fdf4be82ab79f37c477bf2b675c0e (diff) | |
download | infinitytier-d6a346ca6e45c1735a991521ebc4b7c9405abf7e.tar.gz infinitytier-d6a346ca6e45c1735a991521ebc4b7c9405abf7e.zip |
Fix for GitHub issue #35 and also possibly partial fix for #29 issues.
Diffstat (limited to 'node/Peer.hpp')
-rw-r--r-- | node/Peer.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/node/Peer.hpp b/node/Peer.hpp index af011818..64e9c39a 100644 --- a/node/Peer.hpp +++ b/node/Peer.hpp @@ -295,6 +295,20 @@ public: } /** + * 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 */ inline const unsigned char *key() const throw() { return _key; } @@ -411,6 +425,7 @@ public: return (p - startAt); } + private: /** * A direct IP path to a peer |