diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-04-17 17:47:04 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-04-17 17:47:04 +0000 |
commit | b4bb6f6b78b37725869a199107f5c222eb6d9e7e (patch) | |
tree | bf4eb0f25c04bd5ab51ab0f4d1e230626cd872ea /sys/net/if_trunk.c | |
parent | 0ce12e1362d853420da3d1778cd033c53982ca49 (diff) |
use ifnewlladdr() for trunk lladdr changes, too
ok stsp
Diffstat (limited to 'sys/net/if_trunk.c')
-rw-r--r-- | sys/net/if_trunk.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c index 7c40d604c1c..74954514111 100644 --- a/sys/net/if_trunk.c +++ b/sys/net/if_trunk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.c,v 1.71 2010/01/12 01:36:33 dlg Exp $ */ +/* $OpenBSD: if_trunk.c,v 1.72 2010/04/17 17:47:03 deraadt Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -285,26 +285,12 @@ void trunk_port_lladdr(struct trunk_port *tp, u_int8_t *lladdr) { struct ifnet *ifp = tp->tp_if; - struct ifaddr *ifa; - struct ifreq ifr; /* Set the link layer address */ trunk_lladdr((struct arpcom *)ifp, lladdr); /* Reset the port to update the lladdr */ - if (ifp->if_flags & IFF_UP) { - int s = splnet(); - ifp->if_flags &= ~IFF_UP; - (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr); - ifp->if_flags |= IFF_UP; - (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr); - splx(s); - TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) { - if (ifa->ifa_addr != NULL && - ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit((struct arpcom *)ifp, ifa); - } - } + ifnewlladdr(ifp); } int |