mirror of
https://github.com/nmap/nmap.git
synced 2025-12-26 09:29:01 +00:00
Continue to consider a target directly connected if its gateway is equal
to its own address.
This commit is contained in:
@@ -2966,9 +2966,11 @@ static int route_dst_netlink(const struct sockaddr_storage *dst,
|
||||
|
||||
for ( ; RTA_OK(rtattr, len); rtattr = RTA_NEXT(rtattr, len)) {
|
||||
if (rtattr->rta_type == RTA_GATEWAY) {
|
||||
rnfo->direct_connect = 0;
|
||||
rc = set_sockaddr(&rnfo->nexthop, rtmsg->rtm_family, RTA_DATA(rtattr));
|
||||
assert(rc != -1);
|
||||
/* Don't consider it directly connected if nexthop == dst. */
|
||||
if (!sockaddr_storage_equal(dst, &rnfo->nexthop))
|
||||
rnfo->direct_connect = 0;
|
||||
} else if (rtattr->rta_type == RTA_OIF && ii == NULL) {
|
||||
char namebuf[32];
|
||||
int intf_index;
|
||||
|
||||
Reference in New Issue
Block a user