summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2003-03-15 21:30:00 +0000
committermdodd <mdodd@FreeBSD.org>2003-03-15 21:30:00 +0000
commitb9f3e4fdb77f3d888d58d514c210d171a35a09c7 (patch)
tree1539e2803409dd6b3354cb187c3c7e4ac884a6d0 /sys/net
parent4dc0153e679ae4b5ddb114b9a41fa49db21a7dc7 (diff)
downloadFreeBSD-src-b9f3e4fdb77f3d888d58d514c210d171a35a09c7.zip
FreeBSD-src-b9f3e4fdb77f3d888d58d514c210d171a35a09c7.tar.gz
Add MAC support.
This is the same code that was added in 1.70 of if_fddisubr.c
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_iso88025subr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/net/if_iso88025subr.c b/sys/net/if_iso88025subr.c
index 56e2a07..457a5ab 100644
--- a/sys/net/if_iso88025subr.c
+++ b/sys/net/if_iso88025subr.c
@@ -43,10 +43,12 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipx.h"
+#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
+#include <sys/mac.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/module.h>
@@ -228,6 +230,12 @@ iso88025_output(ifp, m, dst, rt0)
struct rtentry *rt;
struct arpcom *ac = (struct arpcom *)ifp;
+#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);
getmicrotime(&ifp->if_lastchange);
@@ -409,6 +417,10 @@ iso88025_input(ifp, th, m)
return;
}
+#ifdef MAC
+ mac_create_mbuf_from_ifnet(ifp, m);
+#endif
+
getmicrotime(&ifp->if_lastchange);
ifp->if_ibytes += m->m_pkthdr.len + sizeof(*th);
OpenPOWER on IntegriCloud