Subject: Re: default route deleted incorrectly with dhclient
To: None <tech-net@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: tech-net
Date: 07/20/2006 15:44:52
In article <200607201540.LAA25196@Sparkle.Rodents.Montreal.QC.CA>,
der Mouse <mouse@Rodents.Montreal.QC.CA> wrote:
>>> (It would replace the current text of the delete_old_routes()
>>> function.) [...]
>> I don't get it. Isn't the old code and the new code equivalent?
>
>No.
>
>> Instead of calling:
>> route delete default "$router"
>> you call the new function
>> delete_default "$router"
>> which does the same if it finds that this route exists...
>
>Yes. The point is that "if...", which was missing from the old code.
>The point is to delete the default - but *only* if it points out the
>"correct" interface. There's no way to tell "route delete" to delete
>the route only if it points through a particular interface. (Or at
>least, if there is, I don't know about it, and it should be used
>instead of doing the loop.)
>
>Actually, I don't like the loop. I'd rather see it parse the output of
>"route get default" instead.
Well, code up something then :-)
christos