Subject: Re: default route deleted incorrectly with dhclient
To: None <tech-net@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 07/20/2006 11:35:46
>> (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.
/~\ 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