diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2010-05-08 11:26:07 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2010-05-08 11:26:07 +0000 |
commit | 917ed437406368de6aa4d22b3eb18388fb23299c (patch) | |
tree | a73bd25e89859de8f901cedc9b68c4e0a61758d6 /sys/net/if_trunk.c | |
parent | 50b045c50ccf6722adf24e46ded6bfb16e259f2e (diff) |
Upon changing the MAC address of an if_trunk interface, all ports are switched
to the new MAC. But subsequently added ports were still being assigned the
old MAC address because it was copied from the wrong place. Give newly added
trunk ports the current MAC of the master port, rather than the saved MAC of
the master port. The saved MAC should only be used to restore the original
MAC address of the interface when it is removed from the trunk.
ok claudio@
Diffstat (limited to 'sys/net/if_trunk.c')
-rw-r--r-- | sys/net/if_trunk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c index ef2d24d336f..78a9777bae9 100644 --- a/sys/net/if_trunk.c +++ b/sys/net/if_trunk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.c,v 1.74 2010/04/23 13:51:31 stsp Exp $ */ +/* $OpenBSD: if_trunk.c,v 1.75 2010/05/08 11:26:06 stsp Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -356,7 +356,8 @@ trunk_port_create(struct trunk_softc *tr, struct ifnet *ifp) } /* Update link layer address for this port */ - trunk_port_lladdr(tp, tr->tr_primary->tp_lladdr); + 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); |