Subject: Re: default route deleted incorrectly with dhclient
To: None <tech-net@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-net
Date: 07/20/2006 18:31:37
On Thu, 20 Jul 2006, Christos Zoulas wrote:
> I don't get it. Isn't the old code and the new code equivalent?

There's a bug in route(8) such that "route delete default ${foo}"
deletes the default route even if the gateway was not ${foo}.  The
script under discussion seems to be an attempt to work around the bug.

$ netstat -rn -f inet | grep default
default            10.64.64.64        UGS         -   ppp0
$ sudo route delete default 1.2.3.4
delete net default: gateway 1.2.3.4
$ netstat -rn -f inet | grep default
$ : see that default route has gone

--apb (Alan Barrett)