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 ...
Hajimu UMEMOTO
ume at mahoroba.org
Mon Jun 13 17:00:23 GMT 2005
Hi,
>>>>> On Fri, 10 Jun 2005 16:49:24 +0000 (UTC)
>>>>> Brooks Davis <brooks at 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 at mahoroba.org ume at bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/
More information about the cvs-src
mailing list