Subject: Re: kern/3508 bug: cached ip route and interface up/down.
To: der Mouse <mouse@rodents.montreal.qc.ca>
From: Nick Amato <naamato@nexthop.com>
List: tech-kern
Date: 11/12/2002 21:31:16
On Wed, Nov 13, 2002 at 01:53:55AM +0100, der Mouse wrote:
> > Unless I'm mistaken, glancing over rtrequest1(), I think the code
> > already does this. When the more specific route is deleted, the
> > rt_entry referenced by the cache has its RTF_UP cleared and this is
> > noticed in ip_output().
>
> I'm not so sure. How is the cached route located and where is its
> RTF_UP cleared? The route being deleted has its RTF_UP cleared, but
> that's not the one ipforward_rt points to; unless the route is to a /32
> or the packet is to the all-0 host portion, it can't be - the cached
> route always has the exact /32 as its destination.
That's not what I see.
Rtalloc() should call rtalloc1(), which will find the "best matching"
route (i.e. most specific).
The cache, however, is still a "host" cache in that the full address
of the packet being sent is checked. The rtentry referenced by
the cache may actually be a net route.
Nick