mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#359 drop packets with nil distances if using trusted range feature
This commit is contained in:
parent
41442012c2
commit
f95ac8be8c
@ -311,7 +311,7 @@ function comms.authd_packet()
|
||||
self.valid = false
|
||||
self.raw = self.modem_msg_in.msg
|
||||
|
||||
if (type(max_distance) == "number") and (type(distance) == "number") and (distance > max_distance) then
|
||||
if (type(max_distance) == "number") and ((type(distance) ~= "number") or (distance > max_distance)) then
|
||||
-- outside of maximum allowable transmission distance
|
||||
-- log.debug("comms.authd_packet.receive(): discarding packet with distance " .. distance .. " (outside trusted range)")
|
||||
else
|
||||
|
@ -18,7 +18,7 @@ local type = type
|
||||
local util = {}
|
||||
|
||||
-- scada-common version
|
||||
util.version = "1.1.4"
|
||||
util.version = "1.1.5"
|
||||
|
||||
util.TICK_TIME_S = 0.05
|
||||
util.TICK_TIME_MS = 50
|
||||
|
Loading…
Reference in New Issue
Block a user