mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Show a hint about an IPv6 zone ID suffix when get_srcaddr fails.
This commit is contained in:
parent
d1a518e08d
commit
43422f9344
1 changed files with 5 additions and 0 deletions
|
|
@ -3074,6 +3074,11 @@ static int get_srcaddr(const struct sockaddr_storage *dst,
|
|||
rc = connect(fd, (struct sockaddr *) &dst_dummy, dst_dummy_len);
|
||||
if (rc == -1) {
|
||||
netutil_error("%s: can't connect socket: %s", __func__, socket_strerror(socket_errno()));
|
||||
if (dst->ss_family == AF_INET6) {
|
||||
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &dst_dummy;
|
||||
if (sin6->sin6_scope_id == 0)
|
||||
netutil_error("Do you need an IPv6 zone ID suffix (e.g. %%eth0 or %%1)?");
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue