From 93a54ee8b13e37390a4475cead830e1c7cb5093c Mon Sep 17 00:00:00 2001 From: kroosec Date: Sun, 5 Aug 2012 11:02:44 +0000 Subject: [PATCH] ospf.lua: Fixed error in checksum calculation for hello and dbdescription packets. --- nselib/ospf.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nselib/ospf.lua b/nselib/ospf.lua index 07de1e627..66bc7696b 100644 --- a/nselib/ospf.lua +++ b/nselib/ospf.lua @@ -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,