diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-02-01 15:22:14 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-02-01 15:22:14 -0800 |
| commit | 9284e4edfe8267f4f33ac563a17571fcf73833a0 (patch) | |
| tree | 99872ee79eba2f2cc7a404135ffef9dbcf6855e3 /node/Switch.cpp | |
| parent | 62a705af1c88dd3b6cd40d1d3b1ce5e602a5ad31 (diff) | |
| download | infinitytier-9284e4edfe8267f4f33ac563a17571fcf73833a0.tar.gz infinitytier-9284e4edfe8267f4f33ac563a17571fcf73833a0.zip | |
agree() must be called on our identity, the one with the secret
Diffstat (limited to 'node/Switch.cpp')
| -rw-r--r-- | node/Switch.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp index 56a15f0a..2ab3ccfc 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -82,12 +82,12 @@ void Switch::onRemotePacket(const InetAddress &localAddr,const InetAddress &from * no longer send these, but we'll listen for them for a while to * locate peers with versions <1.0.4. */ - Address beaconAddr(reinterpret_cast<const char *>(data) + 8,5); + const Address beaconAddr(reinterpret_cast<const char *>(data) + 8,5); if (beaconAddr == RR->identity.address()) return; if (!RR->node->shouldUsePathForZeroTierTraffic(beaconAddr,localAddr,fromAddr)) return; - SharedPtr<Peer> peer(RR->topology->getPeer(beaconAddr)); + const SharedPtr<Peer> peer(RR->topology->getPeer(beaconAddr)); if (peer) { // we'll only respond to beacons from known peers if ((now - _lastBeaconResponse) >= 2500) { // limit rate of responses _lastBeaconResponse = now; |
