1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-23 16:09:02 +00:00

Improved EIGRP processing for broadcast-listener. The pattern match was insufficient so I added a check for IP protocol 88.

This commit is contained in:
tomsellers
2012-02-14 23:38:01 +00:00
parent 8425cb69e1
commit 8a0931b752

View File

@@ -165,6 +165,9 @@ Decoders = {
process = function(self, layer3) process = function(self, layer3)
local p = packet.Packet:new( layer3, #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) local data = layer3:sub(p.ip_data_offset + 1)
-- Extract the EIGRP header -- Extract the EIGRP header
@@ -267,8 +270,10 @@ Decoders = {
process = function(self, layer3) process = function(self, layer3)
local p = packet.Packet:new( layer3, #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 -- Extract the EIGRP header
local pos, ver, opcode, checksum, flags, seq, ack, asnum = bin.unpack(">CCSiiii", data) local pos, ver, opcode, checksum, flags, seq, ack, asnum = bin.unpack(">CCSiiii", data)