1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-23 16:09:02 +00:00

Add specifiers for source address and interface in route_dst_netlink.

We previously restricted by destination address; do it for source
address as well. This can matter in some configurations.

http://seclists.org/nmap-dev/2012/q3/831

There still seems to be a problem with the wrong route being chosen with
--send-ip, but this patch is reported to work with --send-eth.
This commit is contained in:
david
2012-09-11 18:39:42 +00:00
parent be636dacaf
commit 5b8c1090e5

View File

@@ -3093,6 +3093,10 @@ static int route_dst_netlink(const struct sockaddr_storage *dst,
/* Add rtattrs for destination address and interface. */
add_rtattr_addr(nlmsg, &rtattr, &len, RTA_DST, dst);
if (spoofss != NULL) {
/* Add rtattrs for source address and interface. */
add_rtattr_addr(nlmsg, &rtattr, &len, RTA_SRC, spoofss);
}
iov.iov_base = nlmsg;
iov.iov_len = nlmsg->nlmsg_len;