retrans with correct passphrase

topo
Simon 3 years ago
parent 445ae4474c
commit 1f92e1b784

@ -275,6 +275,8 @@ class OPENBRIDGE(DatagramProtocol):
for system in self._CONFIG['SYSTEMS']:
if self._CONFIG['SYSTEMS'][system]['MODE'] == 'OPENBRIDGE':
if self._config['ENHANCED_OBP'] and self._config['TARGET_IP']:
if '_bcka' in self._config and self._config['_bcka'] > time() - 60:
continue
_packet = b''.join([BCTO,self._CONFIG['GLOBAL']['SERVER_ID'],self._CONFIG['SYSTEMS'][system]['NETWORK_ID'],self._CONFIG['SYSTEMS'][system]['VER'].to_bytes(1,"big"),_hops])
_h = blake2b(key=self._config['PASSPHRASE'], digest_size=16)
_h.update(_packet)
@ -293,7 +295,7 @@ class OPENBRIDGE(DatagramProtocol):
if self._CONFIG['SYSTEMS'][system]['MODE'] == 'OPENBRIDGE' and self._CONFIG['SYSTEMS'][system]['VER'] > 5:
if self._config['ENHANCED_OBP'] and self._config['TARGET_IP']:
_packet = b''.join([BCTO,_string,_hops])
_h = blake2b(key=self._config['PASSPHRASE'], digest_size=16)
_h = blake2b(key=self._CONFIG['SYSTEMS'][system]['PASSPHRASE'], digest_size=16)
_h.update(_packet)
_hash = _h.digest()
_packet = b''.join([_packet,_hash])

Loading…
Cancel
Save

Powered by TurnKey Linux.