From 732c32a09e14f3ee7b1bc0beb94846522531a898 Mon Sep 17 00:00:00 2001 From: fyodor Date: Mon, 12 May 2008 03:04:01 +0000 Subject: [PATCH] Quite if user tries ICMP echo/netmask/timestamp request ping with IPv6, sine we don't yet support it. Patch from Jah. --- NmapOps.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NmapOps.cc b/NmapOps.cc index 6073962c5..f3214c7cf 100644 --- a/NmapOps.cc +++ b/NmapOps.cc @@ -376,6 +376,10 @@ void NmapOps::ValidateOptions() { fatal("Ping scan is not valid with any other scan types (the other ones all include a ping scan"); } + if (af() == AF_INET6 && (PINGTYPE_ICMP_PING || PINGTYPE_ICMP_MASK || PINGTYPE_ICMP_TS)) { + fatal("ICMP Echo, Timestamp and Address Mask pings are only valid for IPv4."); + } + if (sendpref == PACKET_SEND_NOPREF) { #ifdef WIN32 sendpref = PACKET_SEND_ETH_STRONG;