summaryrefslogtreecommitdiff
path: root/node/IncomingPacket.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-07-07 11:49:38 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-07-07 11:49:38 -0700
commit412389ec755528108e0254e75a9cf43fc53e331a (patch)
treeb709372474eeb9ddb959884d72b551cba34674c3 /node/IncomingPacket.cpp
parentcf6f30963cdf6de47342e6724ebd7f8e8058ad43 (diff)
downloadinfinitytier-412389ec755528108e0254e75a9cf43fc53e331a.tar.gz
infinitytier-412389ec755528108e0254e75a9cf43fc53e331a.zip
Implement ERROR_UNWATNED_MULTICAST
Diffstat (limited to 'node/IncomingPacket.cpp')
-rw-r--r--node/IncomingPacket.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/node/IncomingPacket.cpp b/node/IncomingPacket.cpp
index d5b4e9e6..6c3a0932 100644
--- a/node/IncomingPacket.cpp
+++ b/node/IncomingPacket.cpp
@@ -156,7 +156,10 @@ bool IncomingPacket::_doERROR(const RuntimeEnvironment *RR,const SharedPtr<Peer>
} break;
case Packet::ERROR_UNWANTED_MULTICAST: {
- // TODO: unsubscribe
+ uint64_t nwid = at<uint64_t>(ZT_PROTO_VERB_ERROR_IDX_PAYLOAD);
+ MulticastGroup mg(MAC(field(ZT_PROTO_VERB_ERROR_IDX_PAYLOAD + 8,6),6),at<uint32_t>(ZT_PROTO_VERB_ERROR_IDX_PAYLOAD + 14));
+ TRACE("%.16llx: peer %s unsubscrubed from multicast group %s",nwid,peer->address().toString().c_str(),mg.toString().c_str());
+ RR->mc->remove(nwid,mg,peer->address());
} break;
default: break;