Subject: Re: kern/3508 bug: cached ip route and interface up/down.
To: None <,>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 11/13/2002 16:15:07
> The current scheme does:

>   A route is looked up for a host, and cached for later reuse for the
>   same host.

> Such a scheme is correct if every time a cached route is used, the
> same route would have been found by a new search.


> Clearing the cached route every time it is used is safe but
> inefficient (for back to back packets with huge table, which is
> presumably the point).

In fact, it amounts to doing away with the cache altogether.

> The easy and safe solution is to clear the cached route _every time_
> the routing table is changed

Yes.  Except that it's not all that easy, because the routing table
code doesn't know anything about that cache - has no idea that it
exists at all, as far as I can see.

I'm inclined to agree with who was it, Dennis Ferguson?, who said the
right thing to do is make sure that routing lookups are cheap enough
that the cache isn't needed.  If a cache really is needed, move it into
the routing table, rather than having IPv4 do it behind the routing
code's back.  Then the routing code can know about it and clear it when

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B