diff --git a/hblink.py b/hblink.py index 4e3844e..f51f4dc 100755 --- a/hblink.py +++ b/hblink.py @@ -766,11 +766,11 @@ class OPENBRIDGE(DatagramProtocol): if _hash == _hash2: logger.trace('(%s) *ProtoControl* BCTO received: %s connected to %s with proto ver. %s. HOPS: %s ',self._system, int_id(_src), int_id(_dst), int.from_bytes(_ver,'big'), int.from_bytes(_hops,'big')) if int.from_bytes(_hops,'big') < 10 and _src != self._CONFIG['GLOBAL']['SERVER_ID'] and not self.check_bcto_uid(_uid): + self.process_bcto(_uid,_src,_dst,_ver,_hops) self.retransmit_bcto(_packet[4:17],int.from_bytes(_hops,'big')) else: logger.trace('(%s) *BridgeControl* not retransmitting BCTO - hop count exceeded, already seen or my packet',self._system) - if not self.check_bcto_uid(_uid): - self.process_bcto(_uid,_src,_dst,_ver,_hops) + else: h,p = _sockaddr logger.warning('(%s) *ProtoControl* BCTO invalid, packet discarded - OPCODE: %s DATA: %s HMAC LENGTH: %s HMAC: %s SRC IP: %s SRC PORT: %s', self._system, _packet[:4], repr(_packet[:18]), len(_packet[18:]),repr(_packet[18:]),h,p)