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:
@@ -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,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user