diff options
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r-- | sys/net/if_ethersubr.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 541ef43..d0617c3 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -510,6 +510,14 @@ ether_input(struct ifnet *ifp, struct mbuf *m) } #endif +#ifdef MAC + /* + * Tag the mbuf with an appropriate MAC label before any other + * consumers can get to it. + */ + mac_create_mbuf_from_ifnet(ifp, m); +#endif + /* * Give bpf a chance at the packet. */ @@ -529,10 +537,6 @@ ether_input(struct ifnet *ifp, struct mbuf *m) m->m_flags &= ~M_HASFCS; } -#ifdef MAC - mac_create_mbuf_from_ifnet(ifp, m); -#endif - ifp->if_ibytes += m->m_pkthdr.len; /* Handle ng_ether(4) processing, if any */ |