diff options
author | 2004-08-31 05:31:39 +0000 | |
---|---|---|
committer | 2004-08-31 05:31:39 +0000 | |
commit | c0e14d9cf3a3837c4a63ad136845b4c96dffec99 (patch) | |
tree | 6b8f298f79e9952c85ef9776ce552b8917e68909 | |
parent | a few fixes from weissmanndude (diff) | |
download | wireguard-openbsd-c0e14d9cf3a3837c4a63ad136845b4c96dffec99.tar.xz wireguard-openbsd-c0e14d9cf3a3837c4a63ad136845b4c96dffec99.zip |
Prevent backup CARP hosts from replying to arp requests, fixes strangeness
with some layer-3 switches. From Bill Marquette.
ok henning@ mickey@ dhartmei@ and deraadt@
-rw-r--r-- | sys/netinet/ip_carp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index b4a87e8e552..47386c94061 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.61 2004/06/24 19:35:25 tholo Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.62 2004/08/31 05:31:39 mcbride Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -1081,7 +1081,7 @@ carp_iamatch(void *v, struct in_ifaddr *ia, TAILQ_FOREACH(vh, &cif->vhif_vrs, sc_list) { if ((vh->sc_ac.ac_if.if_flags & (IFF_UP|IFF_RUNNING)) == (IFF_UP|IFF_RUNNING) && ia->ia_ifp == - &vh->sc_ac.ac_if) { + &vh->sc_ac.ac_if && vh->sc_state == MASTER) { *enaddr = vh->sc_ac.ac_enaddr; return (1); } @@ -1104,7 +1104,8 @@ carp_iamatch6(void *v, struct in6_addr *taddr) if (IN6_ARE_ADDR_EQUAL(taddr, &ifatoia6(ifa)->ia_addr.sin6_addr) && ((vh->sc_ac.ac_if.if_flags & - (IFF_UP|IFF_RUNNING)) == (IFF_UP|IFF_RUNNING))) + (IFF_UP|IFF_RUNNING)) == (IFF_UP|IFF_RUNNING)) && + vh->sc_state == MASTER) return (ifa); } } |