Check shouldUsePathForZeroTierTraffic in legacy beacon responder.

This commit is contained in:
Adam Ierymenko 2016-01-11 15:57:58 -08:00
parent b3e3d4cacc
commit bbcc3304a0

View File

@ -89,6 +89,8 @@ void Switch::onRemotePacket(const InetAddress &localAddr,const InetAddress &from
Address beaconAddr(reinterpret_cast<const char *>(data) + 8,5); Address beaconAddr(reinterpret_cast<const char *>(data) + 8,5);
if (beaconAddr == RR->identity.address()) if (beaconAddr == RR->identity.address())
return; return;
if (!RR->node->shouldUsePathForZeroTierTraffic(localAddr,fromAddr))
return;
SharedPtr<Peer> peer(RR->topology->getPeer(beaconAddr)); SharedPtr<Peer> peer(RR->topology->getPeer(beaconAddr));
if (peer) { // we'll only respond to beacons from known peers if (peer) { // we'll only respond to beacons from known peers
const uint64_t now = RR->node->now(); const uint64_t now = RR->node->now();