From owner-freebsd-net@FreeBSD.ORG Fri Jun 10 22:01:36 2005 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4408516A41C; Fri, 10 Jun 2005 22:01:36 +0000 (GMT) (envelope-from thompsa@fud.org.nz) Received: from heff.fud.org.nz (60-234-149-201.bitstream.orcon.net.nz [60.234.149.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D29543D4C; Fri, 10 Jun 2005 22:01:35 +0000 (GMT) (envelope-from thompsa@fud.org.nz) Received: from thompsa by heff.fud.org.nz with local (Exim 4.50 (FreeBSD)) id 1DgrZF-000IIB-Nh; Sat, 11 Jun 2005 10:01:33 +1200 Date: Sat, 11 Jun 2005 10:01:33 +1200 From: Andrew Thompson To: Brooks Davis Message-ID: <20050610220133.GA69748@heff.fud.org.nz> Mail-Followup-To: Andrew Thompson , Brooks Davis , current@freebsd.org, net@freebsd.org References: <20050609064452.GC1595@odin.ac.hmc.edu> <20050610162600.GA12928@odin.ac.hmc.edu> <20050610165724.GA17120@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050610165724.GA17120@odin.ac.hmc.edu> User-Agent: Mutt/1.4.2.1i Sender: Andrew Thompson Cc: current@freebsd.org, net@freebsd.org Subject: Re: HEADSUP: internal network interface changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2005 22:01:36 -0000 On Fri, Jun 10, 2005 at 09:57:24AM -0700, Brooks Davis wrote: > On Fri, Jun 10, 2005 at 09:26:00AM -0700, Brooks Davis wrote: > > Look out! :-) > > > > This change is incoming sortly (pending final cvs updates). > > I've committed the change bumping __FreeBSD_version. Hopefully the > ride won't be too bumpy. If you have any problems, please report them > on -current as well as to me directly. Most problems should be fairly > simple to fix. I will be checking my e-mail regularly for at least the > next 14 hours. > Im getting a panic with if_bridge, it seems to have been missed from the if_alloc() changes. cheers, Andrew Index: sys/net/if_bridge.c =================================================================== RCS file: /home/ncvs/src/sys/net/if_bridge.c,v retrieving revision 1.6 diff -u -r1.6 if_bridge.c --- sys/net/if_bridge.c 10 Jun 2005 16:49:18 -0000 1.6 +++ sys/net/if_bridge.c 10 Jun 2005 21:55:30 -0000 @@ -422,7 +422,11 @@ sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO); BRIDGE_LOCK_INIT(sc); - ifp = sc->sc_ifp; + ifp = sc->sc_ifp = if_alloc(IFT_BRIDGE); + if (ifp == NULL) { + free(sc, M_DEVBUF); + return (ENOSPC); + } sc->sc_brtmax = BRIDGE_RTABLE_MAX; sc->sc_brttimeout = BRIDGE_RTABLE_TIMEOUT; @@ -447,7 +451,6 @@ ifp->if_output = bridge_output; ifp->if_start = bridge_start; ifp->if_init = bridge_init; - ifp->if_type = IFT_BRIDGE; IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); @@ -499,6 +502,7 @@ mtx_unlock(&bridge_list_mtx); ether_ifdetach(ifp); + if_free(ifp); /* Tear down the routing table. */ bridge_rtable_fini(sc);