Avoid a problem with phantom services on port 0

git-svn-id: file:///home/svn/framework3/trunk@13334 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Tod Beardsley 2011-07-25 13:24:41 +00:00
parent 6b1dfd5908
commit b965d4b6c8
1 changed files with 2 additions and 0 deletions

View File

@ -2209,6 +2209,8 @@ class DBManager
pkt = PacketFu::Packet.parse(p) rescue next # Just silently skip bad packets
next unless pkt.is_ip? # Skip anything that's not IP. Technically, not Ethernet::Ip
next if pkt.is_tcp? && (pkt.tcp_src == 0 || pkt.tcp_dst == 0) # Skip port 0
next if pkt.is_udp? && (pkt.udp_src == 0 || pkt.udp_dst == 0) # Skip port 0
saddr = pkt.ip_saddr
daddr = pkt.ip_daddr