diff options
author | 2013-10-28 12:39:42 +0000 | |
---|---|---|
committer | 2013-10-28 12:39:42 +0000 | |
commit | 51c97a9a6cb11c00bb20824ea8e1269090a9c0c4 (patch) | |
tree | 326544f3beb59b86512f3b15136bbc4eb48996b6 | |
parent | tedu FDDI documentation bits. (diff) | |
download | wireguard-openbsd-51c97a9a6cb11c00bb20824ea8e1269090a9c0c4.tar.xz wireguard-openbsd-51c97a9a6cb11c00bb20824ea8e1269090a9c0c4.zip |
Do not use the multicast macro IFP_TO_IA() to check if an interface has
a configured IPv4 address but iterates on its private list instead.
ok deraadt@
-rw-r--r-- | sys/net/if_bridge.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index b6c64b6e6e6..24676cd8634 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.218 2013/10/17 16:27:40 bluhm Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.219 2013/10/28 12:39:42 mpi Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -58,7 +58,6 @@ #ifdef INET #include <netinet/in.h> #include <netinet/in_systm.h> -#include <netinet/in_var.h> #include <netinet/ip.h> #include <netinet/ip_var.h> #include <netinet/if_ether.h> @@ -1616,9 +1615,12 @@ bridge_localbroadcast(struct bridge_softc *sc, struct ifnet *ifp, */ etype = ntohs(eh->ether_type); if (!(m->m_flags & M_VLANTAG) && etype == ETHERTYPE_IP) { - struct in_ifaddr *ia; - IFP_TO_IA(ifp, ia); - if (!ia) + struct ifaddr *ifa; + TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) { + if (ifa->ifa_addr->sa_family == AF_INET) + break; + } + if (ifa == NULL) return; } #endif |