From 6d4ef2aa7e4a394c0ac435fa836535b49470dee9 Mon Sep 17 00:00:00 2001 From: kris Date: Sat, 27 Jan 2007 20:09:14 +0000 Subject: [PATCH] Fix the IPProto scan for UDP. Now we check for ICMP Port Unreachable and call it open if we get one. This was coming up open|filtered, and sometimes filtered before. --- scan_engine.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scan_engine.cc b/scan_engine.cc index 35b468ed1..4c8adc8a2 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -3090,7 +3090,11 @@ static bool get_pcap_result(UltraScanInfo *USI, struct timeval *stime) { if (USI->scantype == UDP_SCAN && hss->target->v4hostip()->s_addr == ip->ip_src.s_addr) newstate = PORT_CLOSED; - else newstate = PORT_FILTERED; + else if (USI->scantype == IPPROT_SCAN && + hss->target->v4hostip()->s_addr == ip->ip_src.s_addr) + newstate = PORT_OPEN; + else + newstate = PORT_FILTERED; break; case 9: /* dest. net admin prohibited */ case 10: /* detst host admin prohibited */