fix authentication checks on RX packets
This commit is contained in:
parent
e80fe33545
commit
697b492d4e
13
dmrlink.py
13
dmrlink.py
@ -1098,13 +1098,14 @@ class IPSC(DatagramProtocol):
|
|||||||
_ipsc_seq = data[5:6]
|
_ipsc_seq = data[5:6]
|
||||||
|
|
||||||
# AUTHENTICATE THE PACKET
|
# AUTHENTICATE THE PACKET
|
||||||
if not self.validate_auth(self._local['AUTH_KEY'], data):
|
if self._local['AUTH_ENABLED']:
|
||||||
logger.warning('(%s) AuthError: IPSC packet failed authentication. Type %s: Peer: %s, %s:%s', self._network, h(_packettype), int_id(_peerid), host, port)
|
if not self.validate_auth(self._local['AUTH_KEY'], data):
|
||||||
return
|
logger.warning('(%s) AuthError: IPSC packet failed authentication. Type %s: Peer: %s, %s:%s', self._network, h(_packettype), int_id(_peerid), host, port)
|
||||||
|
return
|
||||||
|
|
||||||
# REMOVE SHA-1 AUTHENTICATION HASH: WE NO LONGER NEED IT
|
# REMOVE SHA-1 AUTHENTICATION HASH: WE NO LONGER NEED IT
|
||||||
else:
|
else:
|
||||||
data = self.strip_hash(data)
|
data = self.strip_hash(data)
|
||||||
|
|
||||||
# PACKETS THAT WE RECEIVE FROM ANY VALID PEER OR VALID MASTER
|
# PACKETS THAT WE RECEIVE FROM ANY VALID PEER OR VALID MASTER
|
||||||
if _packettype in ANY_PEER_REQUIRED:
|
if _packettype in ANY_PEER_REQUIRED:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user