diff options
author | glebius <glebius@FreeBSD.org> | 2005-02-14 11:58:54 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-02-14 11:58:54 +0000 |
commit | db16f02fe3ae580aab2242ba7ca6506161ec5408 (patch) | |
tree | 091ee478216287c2e1619fdd879ad7413c6588f5 /sys | |
parent | eb29a7bac4636e6bec3a03173f13a68d2f0c8446 (diff) | |
download | FreeBSD-src-db16f02fe3ae580aab2242ba7ca6506161ec5408.zip FreeBSD-src-db16f02fe3ae580aab2242ba7ca6506161ec5408.tar.gz |
Check for non-NULL ac_netgraph field in interface arpcom, instead of
checking global presence of ng_ether(4).
Reviewed by: ru
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_ethersubr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 22410e7..eb9fed0 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -316,7 +316,7 @@ ether_output(struct ifnet *ifp, struct mbuf *m, } /* Handle ng_ether(4) processing, if any */ - if (ng_ether_output_p != NULL) { + if (IFP2AC(ifp)->ac_netgraph != NULL) { if ((error = (*ng_ether_output_p)(ifp, &m)) != 0) { bad: if (m != NULL) m_freem(m); @@ -560,7 +560,7 @@ ether_input(struct ifnet *ifp, struct mbuf *m) ifp->if_ibytes += m->m_pkthdr.len; /* Handle ng_ether(4) processing, if any */ - if (ng_ether_input_p != NULL) { + if (IFP2AC(ifp)->ac_netgraph != NULL) { (*ng_ether_input_p)(ifp, &m); if (m == NULL) return; @@ -777,7 +777,7 @@ discard: * hand the packet to it for last chance processing; * otherwise dispose of it. */ - if (ng_ether_input_orphan_p != NULL) { + if (IFP2AC(ifp)->ac_netgraph != NULL) { /* * Put back the ethernet header so netgraph has a * consistent view of inbound packets. @@ -862,7 +862,7 @@ ether_ifattach(struct ifnet *ifp, const u_int8_t *llc) void ether_ifdetach(struct ifnet *ifp) { - if (ng_ether_detach_p != NULL) + if (IFP2AC(ifp)->ac_netgraph != NULL) (*ng_ether_detach_p)(ifp); bpfdetach(ifp); if_detach(ifp); |