Commit ddf5881a authored by nextime's avatar nextime

Better logs for packet timing failures

parent b7e69421
......@@ -351,13 +351,17 @@ class DomIkaBaseProtocol(object):
packet_isvalid=True
#if self.ikahdr.msgtype!=C.IKAP_MSG_ACTION:
# argdict=False
if packet_isvalid and self.checkTimeLimits(self.ikahdr.epoch):
self.core.manageIncomingPacket(self.ikahdr, src, dst, arg, host, port, ptype, argdict, data)
if packet_isvalid:
if self.checkTimeLimits(self.ikahdr.epoch):
self.core.manageIncomingPacket(self.ikahdr, src, dst, arg, host, port, ptype, argdict, data)
else:
log.error("INVALID PACKET TIME FROM "+str(host)+" - packet time: "+str(self.ikahdr.epoch)+" now: "+str(time.time()))
self.invalidPacket()
else:
log.error("INVALID TIME PACKET FROM "+str(host))
log.error("INVALID PACKET (second check) FROM "+str(host))
self.invalidPacket()
else:
log.error("INVALID TIME PACKET FROM "+str(host))
log.error("INVALID PACKET (start) FROM "+str(host))
self.invalidPacket()
log.debug('-----------------------------')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment