diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-01-12 12:25:15 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-01-12 12:25:15 -0800 |
| commit | 93ab8d46b94060e6327610052cf8fc750d87b81e (patch) | |
| tree | 59ee54408970bc3a52535b8ad8c9dcf98003cf26 /node/Switch.cpp | |
| parent | c6571073feb5eeb2cdd5fe102871fafba43b8c17 (diff) | |
| parent | 740eb6ebc4c4af19f9d40ed03e75ba0a0021dc37 (diff) | |
| download | infinitytier-93ab8d46b94060e6327610052cf8fc750d87b81e.tar.gz infinitytier-93ab8d46b94060e6327610052cf8fc750d87b81e.zip | |
Merge branch 'dev' into edge
Diffstat (limited to 'node/Switch.cpp')
| -rw-r--r-- | node/Switch.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp index 9ef8611a..23c534be 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -89,6 +89,8 @@ void Switch::onRemotePacket(const InetAddress &localAddr,const InetAddress &from Address beaconAddr(reinterpret_cast<const char *>(data) + 8,5); if (beaconAddr == RR->identity.address()) return; + if (!RR->node->shouldUsePathForZeroTierTraffic(localAddr,fromAddr)) + return; SharedPtr<Peer> peer(RR->topology->getPeer(beaconAddr)); if (peer) { // we'll only respond to beacons from known peers const uint64_t now = RR->node->now(); @@ -214,7 +216,7 @@ void Switch::onLocalEthernet(const SharedPtr<Network> &network,const MAC &from,c adv[42] = (checksum >> 8) & 0xff; adv[43] = checksum & 0xff; - RR->node->putFrame(network->id(),atPeerMac,from,ZT_ETHERTYPE_IPV6,0,adv,72); + RR->node->putFrame(network->id(),network->userPtr(),atPeerMac,from,ZT_ETHERTYPE_IPV6,0,adv,72); return; // stop processing: we have handled this frame with a spoofed local reply so no need to send it anywhere } } @@ -449,12 +451,6 @@ void Switch::requestWhois(const Address &addr) _sendWhoisRequest(addr,(const Address *)0,0); } -void Switch::cancelWhoisRequest(const Address &addr) -{ - Mutex::Lock _l(_outstandingWhoisRequests_m); - _outstandingWhoisRequests.erase(addr); -} - void Switch::doAnythingWaitingForPeer(const SharedPtr<Peer> &peer) { { // cancel pending WHOIS since we now know this peer |
