From owner-freebsd-arch Mon Dec 13 21: 3:42 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 BFDA914BCF for ; Mon, 13 Dec 1999 21:03:39 -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 GAA22454 for ; Tue, 14 Dec 1999 06:03:38 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id GAA60696 for freebsd-arch@freebsd.org; Tue, 14 Dec 1999 06:03:37 +0100 (MET) Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id DA51B14BD2 for ; Mon, 13 Dec 1999 21:03:29 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id WAA70522 for ; Mon, 13 Dec 1999 22:03:28 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id WAA49761 for ; Mon, 13 Dec 1999 22:03:28 -0700 (MST) Message-Id: <199912140503.WAA49761@harmony.village.org> To: freebsd-arch@freebsd.org Subject: The if_detach problem Date: Mon, 13 Dec 1999 22:03:28 -0700 From: Warner Losh 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? Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message