Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Sep 2001 10:57:24 -0600
From:      Nate Williams <nate@yogotech.com>
To:        Toshihiko ARAI <toshi@jp.FreeBSD.org>
Cc:        nate@yogotech.com (Nate Williams), freebsd-mobile@FreeBSD.ORG
Subject:   Re: [PATCH] pccard_ether and removable_* variables
Message-ID:  <15254.22900.863293.94059@nomad.yogotech.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
> >         # 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_<interface>' 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_<interface>' 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15254.22900.863293.94059>