1
0
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:
jah
2009-06-03 21:39:53 +00:00
parent 440980ae38
commit 99c4008c03
2 changed files with 8 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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);
}