summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 6b5c799a57c..4b440cb2dd1 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.89 2005/04/25 01:34:27 brad Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.90 2005/05/24 02:45:17 reyk Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -94,6 +94,7 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>.
#include <net/route.h>
#include <net/if_llc.h>
#include <net/if_dl.h>
+#include <net/if_media.h>
#include <net/if_types.h>
#include <netinet/in.h>
@@ -127,6 +128,11 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>.
#include <net/if_pppoe.h>
#endif
+#include "trunk.h"
+#if NTRUNK > 0
+#include <net/if_trunk.h>
+#endif
+
#ifdef INET6
#ifndef INET
#include <netinet/in.h>
@@ -256,6 +262,11 @@ ether_output(ifp0, m0, dst, rt0)
short mflags;
struct ifnet *ifp = ifp0;
+#if NTRUNK > 0
+ if (ifp->if_type == IFT_IEEE8023ADLAG)
+ senderr(EBUSY);
+#endif
+
#if NCARP > 0
if (ifp->if_type == IFT_CARP) {
struct ifaddr *ifa;
@@ -608,6 +619,16 @@ ether_input(ifp, eh, m)
struct ether_header *eh_tmp;
#endif
+#if NTRUNK > 0
+ /* Handle input from a trunk port */
+ if (ifp->if_type == IFT_IEEE8023ADLAG) {
+ if (trunk_input(ifp, eh, m) != 0)
+ return;
+ /* Has been set to the trunk interface */
+ ifp = m->m_pkthdr.rcvif;
+ }
+#endif
+
if ((ifp->if_flags & IFF_UP) == 0) {
m_freem(m);
return;