diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-19 13:38:27 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-19 13:38:27 -0700 |
| commit | 3adb183c5f76b69013d052383c4b812e3947041e (patch) | |
| tree | 557531f3adbbb2b115fdd2b0e9352168ffb40b1b /node/IncomingPacket.cpp | |
| parent | 95953b48f963213a803b230e2d83416257716e65 (diff) | |
| download | infinitytier-3adb183c5f76b69013d052383c4b812e3947041e.tar.gz infinitytier-3adb183c5f76b69013d052383c4b812e3947041e.zip | |
Fix bad COM attachment bug and eliminate an unnecessary redundant check.
Diffstat (limited to 'node/IncomingPacket.cpp')
| -rw-r--r-- | node/IncomingPacket.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/node/IncomingPacket.cpp b/node/IncomingPacket.cpp index 6b39963a..19747bbd 100644 --- a/node/IncomingPacket.cpp +++ b/node/IncomingPacket.cpp @@ -529,15 +529,13 @@ bool IncomingPacket::_doEXT_FRAME(const RuntimeEnvironment *RR,const SharedPtr<P const unsigned int flags = (*this)[ZT_PROTO_VERB_EXT_FRAME_IDX_FLAGS]; unsigned int comLen = 0; - bool comFailed = false; if ((flags & 0x01) != 0) { CertificateOfMembership com; comLen = com.deserialize(*this,ZT_PROTO_VERB_EXT_FRAME_IDX_COM); - if (!peer->validateAndSetNetworkMembershipCertificate(RR,network->id(),com)) - comFailed = true; + peer->validateAndSetNetworkMembershipCertificate(RR,network->id(),com); } - if ((comFailed)||(!network->isAllowed(peer))) { + if (!network->isAllowed(peer)) { TRACE("dropped EXT_FRAME from %s(%s): not a member of private network %.16llx",peer->address().toString().c_str(),_remoteAddress.toString().c_str(),network->id()); _sendErrorNeedCertificate(RR,peer,network->id()); return true; |
