mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 11:22:05 +00:00
Show an error instead of silently falling back to AF_INET6.
This commit is contained in:
parent
0d3a8846b0
commit
c5f632382f
1 changed files with 5 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue