From f2494aec619d098adf80300b94cbbed569aa26cb Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 4 Sep 2022 01:35:31 +0100 Subject: [PATCH] For all proto --- hblink.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hblink.py b/hblink.py index dfa41a4..9fb887a 100755 --- a/hblink.py +++ b/hblink.py @@ -418,7 +418,9 @@ class OPENBRIDGE(DatagramProtocol): if compare_digest(_hash, _ckhs) and (_sockaddr == self._config['TARGET_SOCK'] or self._config['RELAX_CHECKS']): _peer_id = _data[11:15] if self._config['NETWORK_ID'] != _peer_id: - logger.error('(%s) OpenBridge packet discarded because NETWORK_ID: %s Does not match sent Peer ID: %s', self._system, int_id(self._config['NETWORK_ID']), int_id(_peer_id)) + if _stream_id not in self._laststrid: + logger.error('(%s) OpenBridge packet discarded because NETWORK_ID: %s Does not match sent Peer ID: %s', self._system, int_id(self._config['NETWORK_ID']), int_id(_peer_id)) + self._laststrid.append(_stream_id) return _seq = _data[4] _rf_src = _data[5:8] @@ -550,7 +552,9 @@ class OPENBRIDGE(DatagramProtocol): if compare_digest(_hash, _ckhs) and (_sockaddr == self._config['TARGET_SOCK'] or self._config['RELAX_CHECKS']): _peer_id = _data[11:15] if self._config['NETWORK_ID'] != _peer_id: - logger.error('(%s) OpenBridge packet discarded because NETWORK_ID: %s Does not match sent Peer ID: %s', self._system, int_id(self._config['NETWORK_ID']), int_id(_peer_id)) + if _stream_id not in self._laststrid: + logger.error('(%s) OpenBridge packet discarded because NETWORK_ID: %s Does not match sent Peer ID: %s', self._system, int_id(self._config['NETWORK_ID']), int_id(_peer_id)) + self._laststrid.append(_stream_id) return _seq = _data[4] _rf_src = _data[5:8]