From 1e6c984b5adc87ad318abd7186e14d2223c96db1 Mon Sep 17 00:00:00 2001 From: rwatson Date: Sun, 20 Oct 2002 22:20:48 +0000 Subject: When a packet is destined for delivery via an ATM medium, perform appropriate interface transmission checks and delivery labeling. While we don't have a local ATM configuration, this code is almost identical to all other interface classes. Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories --- sys/net/if_atmsubr.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c index 9edb7dc..a6c71b5 100644 --- a/sys/net/if_atmsubr.c +++ b/sys/net/if_atmsubr.c @@ -40,10 +40,12 @@ #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_mac.h" #include "opt_natm.h" #include #include +#include #include #include #include @@ -103,6 +105,12 @@ atm_output(ifp, m0, dst, rt0) struct atmllc *llc_hdr = NULL; u_int32_t atm_flags; +#ifdef MAC + error = mac_check_ifnet_transmit(ifp, m); + if (error) + senderr(error); +#endif + if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) senderr(ENETDOWN); @@ -232,6 +240,9 @@ atm_input(ifp, ah, m, rxhand) m_freem(m); return; } +#ifdef MAC + mac_create_mbuf_from_ifnet(ifp, m); +#endif ifp->if_ibytes += m->m_pkthdr.len; if (rxhand) { -- cgit v1.1