FreeBSD 5.4: routetbl leak for a static route if the interface address is removed

stephen leroy steveleroy123 at gmail.com
Thu May 29 18:14:38 UTC 2008


Hi.

I am using FreeBSD 5.4. with a ethernet interface configured with an IP
address. I have installed a static route with a gateway that lies on that
interface's subnet.
So I now effectively have 3 routes on that interface, the interface's subnet
route, the static route, and an ARP entry for the gateway.
When I delete the IP address on that interface, I expect all the 3 routes to
be removed and routetbl count to go down correspondingly. However, it gets
decremented by 1, accounting only for the
interface's subnet route, and not for the static route and the arp.
I found that in in_ifadownkill() which is invoked on deletion of the IP
address, there's a call to rtexpunge(), which frees up the references to the
rtentry, but does not actually call an rtfree.
I would like to know who will free the rtentry for the route cleaned up by
rtexpunge.

- Steve


More information about the freebsd-net mailing list