bcka test

This commit is contained in:
Simon 2021-04-15 18:45:36 +01:00
parent cc5178faab
commit d7bf07c23a
2 changed files with 2 additions and 1 deletions

View File

@ -1104,6 +1104,7 @@ class routerOBP(OPENBRIDGE):
#If target has missed 6 (on 1 min) of keepalives, don't send
if _target_system['ENHANCED_OBP'] ['_bcka'] in _target_system and _target_system['_bcka'] < _pkt_time - 60:
logger.debug(_target_system['_bcka'])
continue

View File

@ -232,8 +232,8 @@ class OPENBRIDGE(DatagramProtocol):
_hash = _packet[4:]
_ckhs = hmac_new(self._config['PASSPHRASE'],_packet[:4],sha1).digest()
if compare_digest(_hash, _ckhs):
logger.debug('(%s) *BridgeControl* Keep Alive received',self._system)
self._config['_bcka'] = time()
logger.debug('(%s) *BridgeControl* Keep Alive received: time %s',self._system,int(self._config['_bcka']))
if _sockaddr != self._config['TARGET_SOCK']:
h,p = _sockaddr
logger.info('(%s) *BridgeControl* Source IP and Port has changed for OBP from %s:%s to %s:%s, updating',self._system,self._config['TARGET_IP'],self._config['TARGET_PORT'],h,p)