Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 May 2008 23:16:25 +0530
From:      "stephen leroy" <steveleroy123@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   FreeBSD 5.4: routetbl leak for a static route if the interface address is removed
Message-ID:  <a013a1d30805291046r37621c3frca2e55bc88b547e0@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a013a1d30805291046r37621c3frca2e55bc88b547e0>