netstat: Make netstat -rn more resilient to having the routing table changing
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 19 Nov 2012 09:51:24 +0000 (17:51 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 19 Nov 2012 09:51:24 +0000 (17:51 +0800)
commit0e23ab10e5db9a505c79ad0f5972c2740ddd3341
tree48fc47f27fd321478a2df3af0fa7c2b05026af3e
parent5e8a14a38da718561403517e00d2ab76880c681f
netstat: Make netstat -rn more resilient to having the routing table changing

Obtained-from: FreeBSD 176289 by jhb
  "Make netstat -rn more resilient to having the routing table change out from
   under it while running.  Note that this is still not perfect:
   - Try to do something intelligent if kvm_read() fails to read a routing
     table structure such as an rtentry, radix_node, or ifnet.
   - Don't follow left and right node pointers in radix_nodes unless
     RNF_ACTIVE is set in rn_flags.  This avoids walking through freed
     radix_nodes."
usr.bin/netstat/route.c