From 4141b621acb1fe44c9fcaa5d16df627857087f11 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sun, 20 Oct 2002 22:27:59 +0000 Subject: [PATCH] When a packet is sent via a FDDI interface, perform appropriate MAC transmission checks; when it is received, label the packet appropriately. Although we don't have a local FDDI setup to test this with, the labeling and checks are identical to other interface classes. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories --- sys/net/if_fddisubr.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c index 997025d5e57a..680ed0df75ca 100644 --- a/sys/net/if_fddisubr.c +++ b/sys/net/if_fddisubr.c @@ -40,10 +40,12 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipx.h" +#include "opt_mac.h" #include #include #include +#include #include #include #include @@ -124,6 +126,12 @@ fddi_output(ifp, m, dst, rt0) struct fddi_header *fh; struct arpcom *ac = IFP2AC(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); @@ -364,6 +372,10 @@ fddi_input(ifp, fh, m) if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) goto dropanyway; +#ifdef MAC + mac_create_mbuf_from_ifnet(ifp, m); +#endif + /* * Discard non local unicast packets when interface * is in promiscuous mode.