Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Dec 1999 23:32:28 -0700
From:      Warner Losh <imp@village.org>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: The if_detach problem 
Message-ID:  <199912150632.XAA58638@harmony.village.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>  <imp@village.org> <199912142145.VAA34161@hak.lan.Awfulhak.org> <19991214160454.26093@right.PCS> 

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




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