mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 12:19:02 +00:00
Show an error instead of silently falling back to AF_INET6.
This commit is contained in:
@@ -642,9 +642,13 @@ int main(int argc, char *argv[])
|
||||
if (targetss.storage.ss_family == AF_INET)
|
||||
targetss.in.sin_port = htons(o.portno);
|
||||
#ifdef HAVE_IPV6
|
||||
else
|
||||
else if (targetss.storage.ss_family == AF_INET6)
|
||||
targetss.in6.sin6_port = htons(o.portno);
|
||||
#endif
|
||||
else if (targetss.storage.ss_family == AF_UNSPEC)
|
||||
; /* Leave unspecified. */
|
||||
else
|
||||
bye("Unknown address family %d.", targetss.storage.ss_family);
|
||||
|
||||
if (srcport != -1) {
|
||||
if (o.listen) {
|
||||
|
||||
Reference in New Issue
Block a user