mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 17:59:04 +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
|
return tostring(self.header) .. data
|
||||||
end
|
end
|
||||||
local data = tostr()
|
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()
|
return tostr()
|
||||||
end,
|
end,
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ OSPF = {
|
|||||||
return tostring(self.header) .. data
|
return tostring(self.header) .. data
|
||||||
end
|
end
|
||||||
local data = tostr()
|
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()
|
return tostr()
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user