summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-10-20 22:20:48 +0000
committerrwatson <rwatson@FreeBSD.org>2002-10-20 22:20:48 +0000
commit1e6c984b5adc87ad318abd7186e14d2223c96db1 (patch)
tree0b32ecf3cda79dff563265686d692c5a2815e3f6
parent8199d9ca41fd41a4d3be227eb9613dab3dc96384 (diff)
downloadFreeBSD-src-1e6c984b5adc87ad318abd7186e14d2223c96db1.zip
FreeBSD-src-1e6c984b5adc87ad318abd7186e14d2223c96db1.tar.gz
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
-rw-r--r--sys/net/if_atmsubr.c11
1 files changed, 11 insertions, 0 deletions
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 <sys/param.h>
#include <sys/systm.h>
+#include <sys/mac.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/sockio.h>
@@ -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) {
OpenPOWER on IntegriCloud