mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Disable traceroute when -6 is requested. Before this, it was possible to reach
traceroute() with IPv6 targets if a ping scan was requested.
This commit is contained in:
8
nmap.cc
8
nmap.cc
@@ -1324,7 +1324,13 @@ int nmap_main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
if(o.traceroute && (o.idlescan || o.connectscan)) {
|
||||
#if HAVE_IPV6
|
||||
if(o.af() == AF_INET6 && o.traceroute) {
|
||||
error("Warning: Traceroute does not support IPv6, disabling...");
|
||||
o.traceroute = 0;
|
||||
} else
|
||||
#endif
|
||||
if(o.traceroute && (o.idlescan || o.connectscan)) {
|
||||
error("Warning: Traceroute does not support idle or connect scan, disabling...");
|
||||
o.traceroute = 0;
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ static char * getServiceXMLBuf(struct serviceDeductions *sd) {
|
||||
void win32_warn_raw_sockets(const char *devname) {
|
||||
static set<string> shown_names;
|
||||
|
||||
if (shown_names.find(devname) == shown_names.end()) {
|
||||
if (devname != NULL && shown_names.find(devname) == shown_names.end()) {
|
||||
error("WARNING: Using raw sockets because %s is not an ethernet device. This probably won't work on Windows.\n", devname);
|
||||
shown_names.insert(devname);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user