diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-09-27 16:41:08 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-09-27 16:41:08 -0700 |
commit | 5ee1ccd65987353dd461f8ea27203da63c0b2cd8 (patch) | |
tree | f532aa4f1d16362a7df223b7c4113c403aba2136 /node | |
parent | 0b44919ba23021231dd561f530c5d30836846735 (diff) | |
download | infinitytier-5ee1ccd65987353dd461f8ea27203da63c0b2cd8.tar.gz infinitytier-5ee1ccd65987353dd461f8ea27203da63c0b2cd8.zip |
Send need credential error on more cases.
Diffstat (limited to 'node')
-rw-r--r-- | node/IncomingPacket.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/node/IncomingPacket.cpp b/node/IncomingPacket.cpp index b77ead4c..dd95f8c8 100644 --- a/node/IncomingPacket.cpp +++ b/node/IncomingPacket.cpp @@ -737,6 +737,8 @@ bool IncomingPacket::_doMULTICAST_LIKE(const RuntimeEnvironment *RR,const Shared if ((!network)||(network->id() != nwid)) network = RR->node->network(nwid); const bool authOnNet = ((network)&&(network->gate(peer))); + if (!authOnNet) + _sendErrorNeedCredentials(RR,peer,nwid); trustEstablished |= authOnNet; if (authOnNet||RR->mc->cacheAuthorized(peer->address(),nwid,now)) { auth = true; @@ -1019,6 +1021,8 @@ bool IncomingPacket::_doMULTICAST_GATHER(const RuntimeEnvironment *RR,const Shar } const bool trustEstablished = ((network)&&(network->gate(peer))); + if (!trustEstablished) + _sendErrorNeedCredentials(RR,peer,nwid); if ( ( trustEstablished || RR->mc->cacheAuthorized(peer->address(),nwid,RR->node->now()) ) && (gatherLimit > 0) ) { Packet outp(peer->address(),RR->identity.address(),Packet::VERB_OK); outp.append((unsigned char)Packet::VERB_MULTICAST_GATHER); |