From ea36c6c8908571ddb82b647e4c54038786df0f7f Mon Sep 17 00:00:00 2001 From: david Date: Mon, 20 Apr 2009 16:37:11 +0000 Subject: [PATCH] Require -d3, not just -d, for the message Found whacked packet protocol 17 in get_ping_pcap_result and rewrite it Received packet with protocol 17; ignoring. The message is printed when we receive a packet we can't use during a ping scan, but it's not "whacked" to receive a UDP packet during a TCP scan for example. --- scan_engine.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scan_engine.cc b/scan_engine.cc index f04227089..42d73c385 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -4557,8 +4557,9 @@ static int get_ping_pcap_result(UltraScanInfo *USI, struct timeval *stime) { if (o.debugging) log_write(LOG_STDOUT, "In response to UDP-ping, we got UDP packet back from %s port %hu (trynum = %d)\n", inet_ntoa(ip->ip_src), htons(udp->uh_sport), trynum); } - } else if (!USI->ptech.rawprotoscan && o.debugging) { - error("Found whacked packet protocol %d in %s.", ip->ip_p, __func__); + } else if (!USI->ptech.rawprotoscan) { + if (o.debugging > 2) + error("Received packet with protocol %d; ignoring.", ip->ip_p); } /* Check for a protocol reply */