HEADSUP: internal network interface changes
Andrew Thompson
thompsa at freebsd.org
Fri Jun 10 22:01:36 GMT 2005
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);
More information about the freebsd-net
mailing list