Date: Tue, 14 Jun 2005 01:59:49 +0900 From: Hajimu UMEMOTO <ume@mahoroba.org> To: Brooks Davis <brooks@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/share/man/man9 ifnet.9 src/sys/compat/ndis kern_ndis.c subr_ndis.c src/sys/contrib/altq/altq altq_rio.c src/sys/contrib/dev/oltr if_oltr.c if_oltr_pci.c if_oltrvar.h src/sys/contrib/pf/net if_pflog.c if_pflog.h if_pfsync.c ... Message-ID: <ygewtoygpkq.wl%ume@mahoroba.org> In-Reply-To: <200506101649.j5AGnOPu077043@repoman.freebsd.org> References: <200506101649.j5AGnOPu077043@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, >>>>> On Fri, 10 Jun 2005 16:49:24 +0000 (UTC) >>>>> Brooks Davis <brooks@FreeBSD.org> said: brooks> sys/net bpf.c bridge.c bridge.h bridgestp.c . . . brooks> if_spppfr.c if_spppsubr.c if_stf.c . . . brooks> Log: brooks> Stop embedding struct ifnet at the top of driver softcs. Instead the brooks> struct ifnet or the layer 2 common structure it was embedded in have brooks> been replaced with a struct ifnet pointer to be filled by a call to the brooks> new function, if_alloc(). The layer 2 common structure is also allocated brooks> via if_alloc() based on the interface type. It is hung off the new brooks> struct ifnet member, if_l2com. It broke stf. It touches ifp->if_softc without initializing it. Here is a patch: Index: sys/net/if_stf.c diff -u -p sys/net/if_stf.c.orig sys/net/if_stf.c --- sys/net/if_stf.c.orig Sat Jun 11 06:54:09 2005 +++ sys/net/if_stf.c Tue Jun 14 01:27:33 2005 @@ -215,12 +215,13 @@ stf_clone_create(struct if_clone *ifc, c return (err); sc = malloc(sizeof(struct stf_softc), M_STF, M_WAITOK | M_ZERO); - ifp = sc->sc_ifp = if_alloc(IFT_STF); + ifp = STF2IFP(sc) = if_alloc(IFT_STF); if (ifp == NULL) { free(sc, M_STF); ifc_free_unit(ifc, unit); return (ENOSPC); } + STF2IFP(sc)->if_softc = sc; /* * Set the name manually rather then using if_initname because * we don't conform to the default naming convention for interfaces. Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ygewtoygpkq.wl%ume>