Replace long callback arg list with struct, and implement path whitelisting, path blacklisting, and local.conf support for roles.

This commit is contained in:
Adam Ierymenko 2016-11-22 10:54:58 -08:00
parent cbaef66e82
commit 42ba70e79e
7 changed files with 302 additions and 217 deletions

View file

@ -85,7 +85,7 @@ 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))
if (!RR->node->shouldUsePathForZeroTierTraffic(beaconAddr,localAddr,fromAddr))
return;
SharedPtr<Peer> peer(RR->topology->getPeer(beaconAddr));
if (peer) { // we'll only respond to beacons from known peers