summaryrefslogtreecommitdiff
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2005-05-24 02:45:19 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2005-05-24 02:45:19 +0000
commitebfdc55d0bccbe344e8950b89a5a0730ccc9253b (patch)
tree0d112ec2b177d5ac16483cb270c2af3be371991e /sys/net/if.c
parentc31238d30ac7cb511a14c4a4bc25106b4f89d822 (diff)
initial import of a trunking (link aggregation and link failover)
implementation. it currently supports round robin mode with link state checking, additional modes will be added later. ok brad@, deraadt@
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 14cf8d65d2b..06b3f2fafdf 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.114 2005/05/24 02:26:04 henning Exp $ */
+/* $OpenBSD: if.c,v 1.115 2005/05/24 02:45:17 reyk Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -105,6 +105,10 @@
#include <net/bpf.h>
#endif
+#if NTRUNK > 0
+#include <net/if_trunk.h>
+#endif
+
#if NBRIDGE > 0
#include <net/if_bridge.h>
#endif
@@ -496,6 +500,11 @@ if_detach(struct ifnet *ifp)
ifp->if_init = if_detached_init;
ifp->if_watchdog = if_detached_watchdog;
+#if NTRUNK > 0
+ if (ifp->if_type == IFT_IEEE8023ADLAG)
+ trunk_port_ifdetach(ifp);
+#endif
+
#if NBRIDGE > 0
/* Remove the interface from any bridge it is part of. */
if (ifp->if_bridge)