1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-08 21:51:28 +00:00

ospf.lua: Fixed error in checksum calculation for hello and dbdescription packets.

This commit is contained in:
kroosec
2012-08-05 11:02:44 +00:00
parent 715525f31b
commit 93a54ee8b1

View File

@@ -159,7 +159,7 @@ OSPF = {
return tostring(self.header) .. data
end
local data = tostr()
self.header.chksum = packet.in_cksum(data:sub(1,16) .. data:sub(19))
self.header.chksum = packet.in_cksum(data:sub(1,12) .. data:sub(25))
return tostr()
end,
@@ -244,7 +244,7 @@ OSPF = {
return tostring(self.header) .. data
end
local data = tostr()
self.header.chksum = packet.in_cksum(data:sub(1,16) .. data:sub(19))
self.header.chksum = packet.in_cksum(data:sub(1,12) .. data:sub(25))
return tostr()
end,