Subject: Re: should the default route get a new interface automatically?
To: None <tech-net@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 07/29/2001 12:40:21
>> The NetBSD kernel doesn't do recursive route lookups (though that
>> would be a useful feature), so it's impossible to create a route in
>> which the interface is determined at packet forwarding time via
>> recursive lookup; the interface associated with a route is always
>> determined at "route add" time.

> Hmmm.... Indeed I don't think I'd want the recursive lookup done for
> every packet....

I do, conceptually (unless, of course, I specifically tell it
otherwise).  I have nothing against routes cacheing their interfaces,
but anything that might invalidate that pointer - other routes
changing, interfaces going up or down or having addresses added or
removed - should flush those caches.

As I see it, this is what we have now, except for the cache flushes.

I've already had to fix a bug in the IP forwarding code that hangs onto
a cached route too long (and last I checked was still present in the
distribution); see PR 3508.  This feels at least vaguely similar (a
cache not being flushed when it should be)....

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