From 8a0931b752c80bd13f614f7d90543349931b7876 Mon Sep 17 00:00:00 2001 From: tomsellers Date: Tue, 14 Feb 2012 23:38:01 +0000 Subject: [PATCH] Improved EIGRP processing for broadcast-listener. The pattern match was insufficient so I added a check for IP protocol 88. --- nselib/data/packetdecoders.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nselib/data/packetdecoders.lua b/nselib/data/packetdecoders.lua index 3439c5e67..48b1063ba 100644 --- a/nselib/data/packetdecoders.lua +++ b/nselib/data/packetdecoders.lua @@ -165,6 +165,9 @@ Decoders = { process = function(self, layer3) local p = packet.Packet:new( layer3, #layer3 ) + -- EIGRP is IP protocol 88 (0x58), so verify this + if ( p.ip_p ~= 88 ) then return end + local data = layer3:sub(p.ip_data_offset + 1) -- Extract the EIGRP header @@ -267,8 +270,10 @@ Decoders = { process = function(self, layer3) local p = packet.Packet:new( layer3, #layer3 ) - local data = layer3:sub(p.ip_data_offset + 1) + -- EIGRP is IP protocol 88 (0x58), so verify this + if ( p.ip_p ~= 88 ) then return end + local data = layer3:sub(p.ip_data_offset + 1) -- Extract the EIGRP header local pos, ver, opcode, checksum, flags, seq, ack, asnum = bin.unpack(">CCSiiii", data)