Send SERVER_ID not NETWORK_ID in packets on OBP.

This commit is contained in:
Simon 2021-05-30 02:46:52 +01:00
parent 5904d471b7
commit 52da820554
2 changed files with 2 additions and 2 deletions

View File

@ -125,7 +125,7 @@ def build_config(_config_file):
'GEN_STAT_BRIDGES': config.getboolean(section, 'GEN_STAT_BRIDGES'),
'ALLOW_NULL_PASSPHRASE': config.getboolean(section, 'ALLOW_NULL_PASSPHRASE'),
'ANNOUNCEMENT_LANGUAGES': config.get(section, 'ANNOUNCEMENT_LANGUAGES'),
'SERVER_ID': config.get(section, 'SERVER_ID')
'SERVER_ID': config.get(section, 'SERVER_ID').to_bytes(4, 'big')
})

View File

@ -132,7 +132,7 @@ class OPENBRIDGE(DatagramProtocol):
def send_system(self, _packet):
if _packet[:4] == DMRD:
#_packet = _packet[:11] + self._config['NETWORK_ID'] + _packet[15:]
_packet = b''.join([_packet[:11], self._config['NETWORK_ID'], _packet[15:]])
_packet = b''.join([_packet[:11], self._CONFIG['GLOBAL']['SERVER_ID'], _packet[15:]])
#_packet += hmac_new(self._config['PASSPHRASE'],_packet,sha1).digest()
_packet = b''.join([_packet, (hmac_new(self._config['PASSPHRASE'],_packet,sha1).digest())])
self.transport.write(_packet, (self._config['TARGET_IP'], self._config['TARGET_PORT']))