mirror of
https://github.com/nmap/nmap.git
synced 2026-06-19 06:58:25 +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:
parent
bc0826654a
commit
78c3a83c87
1 changed files with 5 additions and 0 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue