From owner-freebsd-arch Tue Dec 14 13:48:24 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 11E9814E6C for ; Tue, 14 Dec 1999 13:48:14 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id WAA08894 for ; Tue, 14 Dec 1999 22:48:10 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id WAA66184 for freebsd-arch@freebsd.org; Tue, 14 Dec 1999 22:48:09 +0100 (MET) Received: from awfulhak.org (dynamic-27.max4-du-ws.dialnetwork.pavilion.co.uk [212.74.9.155]) by hub.freebsd.org (Postfix) with ESMTP id 1BBA614CB9 for ; Tue, 14 Dec 1999 13:47:17 -0800 (PST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by awfulhak.org (8.9.3/8.9.3) with ESMTP id VAA30939; Tue, 14 Dec 1999 21:44:06 GMT (envelope-from brian@lan.awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost.lan.Awfulhak.org [127.0.0.1]) by hak.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id VAA34161; Tue, 14 Dec 1999 21:45:36 GMT (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <199912142145.VAA34161@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.1.0 09/18/1999 To: Warner Losh Cc: freebsd-arch@freebsd.org, brian@hak.lan.Awfulhak.org Subject: Re: The if_detach problem In-Reply-To: Message from Warner Losh of "Mon, 13 Dec 1999 22:03:28 MST." <199912140503.WAA49761@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 14 Dec 1999 21:45:36 +0000 From: Brian Somers Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 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 Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message