1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-09 16:09:03 +00:00
Files
nmap/libdnet-stripped/src
david b5c1e83471 Substitute on-link routes' gateways with an all-zero address.
On OS X, the code in route_loop in route-bsd.c can get a gateway
sockaddr_dl that looks like this:

$1 = {
  sdl_len = 20 '\024',
  sdl_family = 18 '\022',
  sdl_index = 4,
  sdl_type = 6 '\006',
  sdl_nlen = 0 '\0',
  sdl_alen = 0 '\0',
  sdl_slen = 0 '\0',
  sdl_data = '\0' <repeats 11 times>
}

route_loop would throw these out because there's no hardward address
there. This is a routing table entry that indicates that there is no
gateway, and that packets for this particular destination need to go on
interface #4. It corresponds to this type of line from netstat output:

Destination        Gateway            Flags        Refs      Use   Netif Expire
192.168.0          link#4             UCS             2        0     en0

I've changed it so that instead of throwing out the entry, it creates an
all-zero address of the same type as the destination address, which is a
convention used (by Nmap at least) to indicate an on-link route.
2012-03-26 22:24:55 +00:00
..
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00
2008-09-19 06:12:25 +00:00