1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-03 21:29:01 +00:00

Added an error message for when the user specifies a device(-e) that doesnt have a route to the target IP in windows.

This was caught by another error message later on, but it was ambiguous and unrelated to the actual problem.
This commit is contained in:
michael
2008-06-17 22:50:37 +00:00
parent bc0826654a
commit 78c3a83c87

View File

@@ -521,6 +521,11 @@ do {
if (rnfo.direct_connect) {
hs->hostbatch[hidx]->setDirectlyConnected(true);
} else {
//if the user selected an interface with the -e command that has no route to their target
//this error message will catch it.
if(rnfo.nexthop.ss_family!=AF_INET || rnfo.nexthop.ss_family!=AF_INET6 ){
fatal("%s: can not find route for non-directly conected device %s.", __func__, hs->hostbatch[hidx]->NameIP());
}
hs->hostbatch[hidx]->setDirectlyConnected(false);
hs->hostbatch[hidx]->setNextHop(&rnfo.nexthop,
sizeof(rnfo.nexthop));