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
This commit is contained in:
Robert Watson 2002-10-20 22:20:48 +00:00
parent 11480fc6ae
commit 9476111d3a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105576

View File

@ -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) {