From 4436824faf726014bf3aa47f6c8d2748ca793ba2 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 27 Feb 2017 17:51:58 -0800 Subject: ipauth characteristic now works with ARP --- node/Membership.cpp | 1 - node/Network.cpp | 2 ++ node/OutboundMulticast.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/node/Membership.cpp b/node/Membership.cpp index d9fa5945..a60b86be 100644 --- a/node/Membership.cpp +++ b/node/Membership.cpp @@ -240,7 +240,6 @@ Membership::AddCredentialResult Membership::addCredential(const RuntimeEnvironme } } - Membership::AddCredentialResult Membership::addCredential(const RuntimeEnvironment *RR,const NetworkConfig &nconf,const CertificateOfOwnership &coo) { _RemoteCredential *const *htmp = std::lower_bound(&(_remoteCoos[0]),&(_remoteCoos[ZT_MAX_CERTIFICATES_OF_OWNERSHIP]),(uint64_t)coo.id(),_RemoteCredentialComp()); diff --git a/node/Network.cpp b/node/Network.cpp index f227d036..645ae67c 100644 --- a/node/Network.cpp +++ b/node/Network.cpp @@ -515,6 +515,8 @@ static _doZtFilterResult _doZtFilter( src.set((const void *)(frameData + 12),4,0); } else if ((etherType == ZT_ETHERTYPE_IPV6)&&(frameLen >= 40)) { src.set((const void *)(frameData + 8),16,0); + } else if ((etherType == ZT_ETHERTYPE_ARP)&&(frameLen >= 28)) { + src.set((const void *)(frameData + 14),4,0); } if (inbound) { if (membership) { diff --git a/node/OutboundMulticast.cpp b/node/OutboundMulticast.cpp index 2f6bf986..36dc41f4 100644 --- a/node/OutboundMulticast.cpp +++ b/node/OutboundMulticast.cpp @@ -88,7 +88,7 @@ void OutboundMulticast::init( void OutboundMulticast::sendOnly(const RuntimeEnvironment *RR,const Address &toAddr) { const SharedPtr nw(RR->node->network(_nwid)); - Address toAddr2(toAddr); + const Address toAddr2(toAddr); if ((nw)&&(nw->filterOutgoingPacket(true,RR->identity.address(),toAddr2,_macSrc,_macDest,_frameData,_frameLen,_etherType,0))) { //TRACE(">>MC %.16llx -> %s",(unsigned long long)this,toAddr.toString().c_str()); _packet.newInitializationVector(); -- cgit v1.2.3