summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2015-12-31 14:18:35 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2015-12-31 14:18:35 +0000
commit4efadd870b4d473544e80b868dcfebb7ccbb4b85 (patch)
tree851e2ee9cef3e11ba7d4c204900d49f0ee5788fb
parent358c13ac206cb8a5181af95a6e4c1a864d004582 (diff)
Move tr_port_destroy down; fixes 'lacp_compose_key protection fault trap'
when removing a port from a lacp trunk. Part of a larger diff from mpi, as suggested by mikeb. ok mpi@
-rw-r--r--sys/net/if_trunk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c
index f6ebaa8f19b..478571a4540 100644
--- a/sys/net/if_trunk.c
+++ b/sys/net/if_trunk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_trunk.c,v 1.125 2015/11/21 11:02:23 dlg Exp $ */
+/* $OpenBSD: if_trunk.c,v 1.126 2015/12/31 14:18:34 sthen Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -414,9 +414,6 @@ trunk_port_destroy(struct trunk_port *tp)
/* Restore previous input handler. */
if_ih_remove(ifp, trunk_input, tp);
- if (tr->tr_port_destroy != NULL)
- (*tr->tr_port_destroy)(tp);
-
/* Remove multicast addresses from this port */
trunk_ether_cmdmulti(tp, SIOCDELMULTI);
@@ -426,6 +423,9 @@ trunk_port_destroy(struct trunk_port *tp)
ifpromisc(ifp, 0);
+ if (tr->tr_port_destroy != NULL)
+ (*tr->tr_port_destroy)(tp);
+
/* Restore interface type. */
ifp->if_type = tp->tp_iftype;