From owner-freebsd-arch Tue Dec 14 22:32:43 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 1B714152AA for ; Tue, 14 Dec 1999 22:32:42 -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 HAA16881 for ; Wed, 15 Dec 1999 07:32:40 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id HAA68774 for freebsd-arch@freebsd.org; Wed, 15 Dec 1999 07:32:39 +0100 (MET) Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id A76A4152AA for ; Tue, 14 Dec 1999 22:32:32 -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 XAA75073; Tue, 14 Dec 1999 23:32: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 XAA58638; Tue, 14 Dec 1999 23:32:28 -0700 (MST) Message-Id: <199912150632.XAA58638@harmony.village.org> To: Andrew Gallatin Subject: Re: The if_detach problem Cc: freebsd-arch@freebsd.org In-reply-to: Your message of "Tue, 14 Dec 1999 22:50:11 EST." <14423.3759.258444.555708@grasshopper.cs.duke.edu> References: <14423.3759.258444.555708@grasshopper.cs.duke.edu> <199912142145.VAA34161@hak.lan.Awfulhak.org> <19991214160454.26093@right.PCS> Date: Tue, 14 Dec 1999 23:32:28 -0700 From: Warner Losh Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <14423.3759.258444.555708@grasshopper.cs.duke.edu> Andrew Gallatin writes: : s = splnet(); : /* : * Close down routes etc. : * This needs to be at splnet : */ : TAILQ_FOREACH(ifp, &ifnet, if_link){ : if(ifp == &sc->myri_if){ : ifp_valid = 1; : break; : } : } : if(ifp_valid){ : struct ifaddr *ia = 0; : struct in_ifaddr *in_ia = 0; : ifp = &sc->myri_if; : : TAILQ_FOREACH(ia, &ifp->if_addrhead, ifa_link){ : if (ia->ifa_addr->sa_family != AF_INET) : continue; : in_ia = (struct in_ifaddr *)ia; : in_ifscrub(ifp, in_ia); : TAILQ_REMOVE(&in_ifaddrhead, in_ia, ia_link); : } : if_detach(&sc->myri_if); : } : splx(s); Any reason not to fold this into if_detach until something more generic could be developed? I like it better than the current solution chceked in recently... Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message