From owner-freebsd-mobile Wed Sep 5 9:57:35 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id E5A4337B409 for ; Wed, 5 Sep 2001 09:57:31 -0700 (PDT) Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.123.131]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id KAA29633; Wed, 5 Sep 2001 10:57:29 -0600 (MDT) (envelope-from nate@nomad.yogotech.com) Received: (from nate@localhost) by nomad.yogotech.com (8.8.8/8.8.8) id KAA15608; Wed, 5 Sep 2001 10:57:25 -0600 (MDT) (envelope-from nate) From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15254.22900.863293.94059@nomad.yogotech.com> Date: Wed, 5 Sep 2001 10:57:24 -0600 To: Toshihiko ARAI Cc: nate@yogotech.com (Nate Williams), freebsd-mobile@FreeBSD.ORG Subject: Re: [PATCH] pccard_ether and removable_* variables In-Reply-To: <200109051230.f85CUGQ39840.toshi@jp.FreeBSD.org> References: <15245.13394.275183.61715@nomad.yogotech.com> <200109011153.f81BrZL93078.toshi@jp.FreeBSD.org> <15253.10889.977127.513674@nomad.yogotech.com> <200109051230.f85CUGQ39840.toshi@jp.FreeBSD.org> X-Mailer: VM 6.95 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > > # Clean the routing table > > case ${removable_route_flush} in > > - [Nn][Oo]) > > + [Nn][Oo] | '') > > ;; > > *) > > - # flush beforehand, just in case.... > > - route -n flush -inet > > + case ${gateway_enable} in > > + [Yy][Ee][Ss]) > > + ;; > > + *) > > + route -n flush -inet > > + ;; > > + esac > > ;; > > esac > > ;; > > > In particular, why don't we flush the routing table if gateway_enable is > > set? That's seems counter-productive. > > No. This condition is reverse semantics. Sorry, I knew what I meant, but I did not write it down correctly. > Therefore setting of removable_route_flush is ignored if gateway_enable > is YES. This is a safe step for 'route flush' not to be executed > carelessly. My opinion is to not have code that has special behavior. If we want the routes flushed, then flush them, even if it's a gateway. If someone doesn't want all the route flushed, then they need to have that ability to flush a specific route (as below). > > Also, as I've mentioned before, is there anyway we can have the routes > > added via 'static_routes_' flushed when the interface is > > removed? This seems to be a step in the right direction, and may > > obviate the need for removable_route_flush completely. > > You may be just right. However, 'static_routes_' is null > and void with DHCP. Implementation of dhclient seems to surely deal > with 'dhclient-script', but I don't so know a lot about DHCP. True, but with DHCP, the routes are flushed automatically via the DHCP scripts. Someone who is using DHCP to get their addresses is certainly not going to be running as a router. > In addition, I do ease with this code personally. > I will want to keep this mechanism if you forgive me. I don't understand the above sentence. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message