mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Don't fatal when get_srcaddr can't connect the socket.
Let it be handled by a higher layer.
This commit is contained in:
parent
a70cdf46b9
commit
d1a518e08d
1 changed files with 4 additions and 2 deletions
|
|
@ -3072,8 +3072,10 @@ static int get_srcaddr(const struct sockaddr_storage *dst,
|
|||
}
|
||||
|
||||
rc = connect(fd, (struct sockaddr *) &dst_dummy, dst_dummy_len);
|
||||
if (rc == -1)
|
||||
netutil_fatal("%s: can't connect socket: %s", __func__, socket_strerror(socket_errno()));
|
||||
if (rc == -1) {
|
||||
netutil_error("%s: can't connect socket: %s", __func__, socket_strerror(socket_errno()));
|
||||
return -1;
|
||||
}
|
||||
|
||||
len = sizeof(*src);
|
||||
rc = getsockname(fd, (struct sockaddr *) src, &len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue