diff options
author | 2015-10-08 13:58:07 +0000 | |
---|---|---|
committer | 2015-10-08 13:58:07 +0000 | |
commit | 603114795bb15779359e2812eda1e9fe51a74a33 (patch) | |
tree | ca1ecd7eedef713821e095022d6c74d964d6878c | |
parent | Handle case where no hint is passed in. Found as a crash of fdm by jturner@ (diff) | |
download | wireguard-openbsd-603114795bb15779359e2812eda1e9fe51a74a33.tar.xz wireguard-openbsd-603114795bb15779359e2812eda1e9fe51a74a33.zip |
Make sure that when trunk_port_ioctl is called to set a new
lladdr the trunk port is already on the list.
OK mpi
-rw-r--r-- | sys/net/if_trunk.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c index 4285dbe0d12..2c2d82d64ed 100644 --- a/sys/net/if_trunk.c +++ b/sys/net/if_trunk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.c,v 1.120 2015/10/08 11:39:59 dlg Exp $ */ +/* $OpenBSD: if_trunk.c,v 1.121 2015/10/08 13:58:07 mikeb Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -360,14 +360,14 @@ trunk_port_create(struct trunk_softc *tr, struct ifnet *ifp) trunk_lladdr(&tr->tr_ac, tp->tp_lladdr); } - /* Update link layer address for this port */ - trunk_port_lladdr(tp, - ((struct arpcom *)(tr->tr_primary->tp_if))->ac_enaddr); - /* Insert into the list of ports */ SLIST_INSERT_HEAD(&tr->tr_ports, tp, tp_entries); tr->tr_count++; + /* Update link layer address for this port */ + trunk_port_lladdr(tp, + ((struct arpcom *)(tr->tr_primary->tp_if))->ac_enaddr); + /* Update trunk capabilities */ tr->tr_capabilities = trunk_capabilities(tr); |