diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-08-31 05:31:40 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-08-31 05:31:40 +0000 |
commit | 71b9865309c87677dc74c03bc00afe12c4823493 (patch) | |
tree | 7ed4d64c56a81791896c089b709cb19a737d940b /sys | |
parent | b9d679b0e8fab4fde112986c45f4a7bec0772587 (diff) |
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@
Diffstat (limited to 'sys')
-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); } } |