diff options
-rw-r--r-- | sys/dev/lmc/if_lmc.c | 4 | ||||
-rw-r--r-- | sys/net/if_bridge.c | 2 | ||||
-rw-r--r-- | sys/net/if_lagg.c | 7 | ||||
-rw-r--r-- | sys/net/if_tap.c | 2 | ||||
-rw-r--r-- | sys/net/if_vlan.c | 4 | ||||
-rw-r--r-- | sys/netgraph/ng_fec.c | 2 | ||||
-rw-r--r-- | sys/netinet/ip_carp.c | 2 |
7 files changed, 12 insertions, 11 deletions
diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c index d5fb9ba..40dc1e5 100644 --- a/sys/dev/lmc/if_lmc.c +++ b/sys/dev/lmc/if_lmc.c @@ -4945,7 +4945,9 @@ lmc_ifnet_detach(softc_t *sc) /* Detach from the ifnet kernel interface. */ if_detach(sc->ifp); -# if (__FreeBSD_version >= 600000) +# if (defined(__FreeBSD__) && __FreeBSD_version >= 800082) + if_free(sc->ifp); +# elif (defined(__FreeBSD__) && __FreeBSD_version >= 600000) if_free_type(sc->ifp, NSPPP ? IFT_PPP : IFT_OTHER); # endif } diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 3b3a19d..8793cf7 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -676,7 +676,7 @@ bridge_clone_destroy(struct ifnet *ifp) bstp_detach(&sc->sc_stp); ether_ifdetach(ifp); - if_free_type(ifp, IFT_ETHER); + if_free(ifp); /* Tear down the routing table. */ bridge_rtable_fini(sc); diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index a7022d4..730047f 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -275,7 +275,7 @@ lagg_clone_create(struct if_clone *ifc, int unit, caddr_t params) if (lagg_protos[i].ti_proto == LAGG_PROTO_DEFAULT) { sc->sc_proto = lagg_protos[i].ti_proto; if ((error = lagg_protos[i].ti_attach(sc)) != 0) { - if_free_type(ifp, IFT_ETHER); + if_free(ifp); free(sc, M_DEVBUF); return (error); } @@ -293,7 +293,6 @@ lagg_clone_create(struct if_clone *ifc, int unit, caddr_t params) ifmedia_set(&sc->sc_media, IFM_ETHER | IFM_AUTO); if_initname(ifp, ifc->ifc_name, unit); - ifp->if_type = IFT_ETHER; ifp->if_softc = sc; ifp->if_start = lagg_start; ifp->if_init = lagg_init; @@ -305,7 +304,7 @@ lagg_clone_create(struct if_clone *ifc, int unit, caddr_t params) IFQ_SET_READY(&ifp->if_snd); /* - * Attach as an ordinary ethernet device, childs will be attached + * Attach as an ordinary ethernet device, children will be attached * as special device IFT_IEEE8023ADLAG. */ ether_ifattach(ifp, eaddr); @@ -352,7 +351,7 @@ lagg_clone_destroy(struct ifnet *ifp) ifmedia_removeall(&sc->sc_media); ether_ifdetach(ifp); - if_free_type(ifp, IFT_ETHER); + if_free(ifp); mtx_lock(&lagg_list_mtx); SLIST_REMOVE(&lagg_list, sc, lagg_softc, sc_entries); diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c index 034fd27..4ff5a49 100644 --- a/sys/net/if_tap.c +++ b/sys/net/if_tap.c @@ -218,7 +218,7 @@ tap_destroy(struct tap_softc *tp) knlist_destroy(&tp->tap_rsel.si_note); destroy_dev(tp->tap_dev); ether_ifdetach(ifp); - if_free_type(ifp, IFT_ETHER); + if_free(ifp); mtx_destroy(&tp->tap_mtx); free(tp, M_TAP); diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index e2eb38b..083086e 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -967,7 +967,7 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) */ ether_ifdetach(ifp); vlan_unconfig(ifp); - if_free_type(ifp, IFT_ETHER); + if_free(ifp); ifc_free_unit(ifc, unit); free(ifv, M_VLAN); @@ -989,7 +989,7 @@ vlan_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) ether_ifdetach(ifp); /* first, remove it from system-wide lists */ vlan_unconfig(ifp); /* now it can be unconfigured and freed */ - if_free_type(ifp, IFT_ETHER); + if_free(ifp); free(ifv, M_VLAN); ifc_free_unit(ifc, unit); diff --git a/sys/netgraph/ng_fec.c b/sys/netgraph/ng_fec.c index eff70ea..53f59e7 100644 --- a/sys/netgraph/ng_fec.c +++ b/sys/netgraph/ng_fec.c @@ -1332,7 +1332,7 @@ ng_fec_shutdown(node_p node) } ether_ifdetach(priv->ifp); - if_free_type(priv->ifp, IFT_ETHER); + if_free(priv->ifp); ifmedia_removeall(&priv->ifmedia); ng_fec_free_unit(priv->unit); free(priv, M_NETGRAPH); diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 34dced8..73024f7 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -472,7 +472,7 @@ carp_clone_destroy(struct ifnet *ifp) mtx_unlock(&carp_mtx); bpfdetach(ifp); if_detach(ifp); - if_free_type(ifp, IFT_ETHER); + if_free(ifp); #ifdef INET free(sc->sc_imo.imo_membership, M_CARP); #endif |