|
|
|
|
@ -156,6 +156,15 @@ class OPENBRIDGE(DatagramProtocol):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if _packet[:3] == DMR and self._config['TARGET_IP']:
|
|
|
|
|
|
|
|
|
|
if 'VER' in self._config and self._config['VER'] > 3:
|
|
|
|
|
_packet = b''.join([DMRF,_packet[4:11], self._CONFIG['GLOBAL']['SERVER_ID'],_packet[15:]])
|
|
|
|
|
_h = blake2b(key=self._config['PASSPHRASE'], digest_size=16)
|
|
|
|
|
_h.update(_packet)
|
|
|
|
|
_hash = _h.digest()
|
|
|
|
|
_packet = b''.join([_packet,time_ns().to_bytes(8,'big'), _hops, _hash])
|
|
|
|
|
self.transport.write(_packet, (self._config['TARGET_IP'], self._config['TARGET_PORT']))
|
|
|
|
|
|
|
|
|
|
if 'VER' in self._config and self._config['VER'] == 3:
|
|
|
|
|
_packet = b''.join([DMRF,_packet[4:11], self._CONFIG['GLOBAL']['SERVER_ID'],_packet[15:]])
|
|
|
|
|
_h = blake2b(key=self._config['PASSPHRASE'], digest_size=16)
|
|
|
|
|
|