Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Dec 1999 21:45:36 +0000
From:      Brian Somers <brian@Awfulhak.org>
To:        Warner Losh <imp@village.org>
Cc:        freebsd-arch@freebsd.org, brian@hak.lan.Awfulhak.org
Subject:   Re: The if_detach problem 
Message-ID:  <199912142145.VAA34161@hak.lan.Awfulhak.org>
In-Reply-To: Message from Warner Losh <imp@village.org>  of "Mon, 13 Dec 1999 22:03:28 MST." <199912140503.WAA49761@harmony.village.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> if_detach doesn't, at least not completely.
> 
> That's a problem when you want to remove interfaces.  One problem is
> that the routing system caches ifaddr and other things.  There is a
> mechanism in place that could be used to clean things up.
> 
> In the protosw there is a ctlinput routine which accepts various
> commands.  One way to deal with this is to send a new command when ifa
> goes away.  Right now when we do if_down we send a PRC_IFDOWN.  Maybe
> we need to invent a new PRC_, say PRC_IFDETACH.  Then we wouldn't need
> the kludges in if_detach.  The ctlinput routines could then, in the
> appropriate places, scrub the references to the interface that just
> went away.
> 
> I'd like to go down this path, any comments?

Not comments, but my thoughts....

Is there a lot to be gained by removing interfaces ?

I would think that losing an interface would mean the existence of an 
interface number with no interface (this may break code that caches 
interface number-to-name information (ppp(8)... I thought about this 
when I wrote the code, but I've never tested it)).

I would also think that adding another interface would get the 
deallocated interface number again.... this'll kill any program that 
thinks it can cache this sort of info (ppp(8)).

I guess ppp could be changed to not cache this sort of stuff....

> Warner

-- 
Brian <brian@Awfulhak.org>                        <brian@FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@OpenBSD.org>
Don't _EVER_ lose your sense of humour !          <brian@FreeBSD.org.uk>






To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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