summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-11-17 12:56:40 +0000
committerglebius <glebius@FreeBSD.org>2005-11-17 12:56:40 +0000
commitbe367893cde807eabde21d3c27468e630a24c071 (patch)
treee916c47065562aedf56eb7d90e7eb4532ec56065 /sys/netinet
parent1e3942d92fbfc6325be930d198f024249f617bcb (diff)
downloadFreeBSD-src-be367893cde807eabde21d3c27468e630a24c071.zip
FreeBSD-src-be367893cde807eabde21d3c27468e630a24c071.tar.gz
MFOpenBSD 1.62:
Prevent backup CARP hosts from replying to arp requests, fixes strangeness with some layer-3 switches. From Bill Marquette. Tested by: Kazuaki Oda <kaakun highway.ne.jp>
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_carp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 23fd4fc..048dad5 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1162,7 +1162,8 @@ carp_iamatch(void *v, struct in_ifaddr *ia,
TAILQ_FOREACH(vh, &cif->vhif_vrs, sc_list) {
if ((SC2IFP(vh)->if_flags & IFF_UP) &&
(SC2IFP(vh)->if_drv_flags & IFF_DRV_RUNNING) &&
- ia->ia_ifp == SC2IFP(vh)) {
+ ia->ia_ifp == SC2IFP(vh) &&
+ vh->sc_state == MASTER) {
*enaddr = IF_LLADDR(vh->sc_ifp);
CARP_UNLOCK(cif);
return (1);
@@ -1187,7 +1188,8 @@ carp_iamatch6(void *v, struct in6_addr *taddr)
if (IN6_ARE_ADDR_EQUAL(taddr,
&ifatoia6(ifa)->ia_addr.sin6_addr) &&
(SC2IFP(vh)->if_flags & IFF_UP) &&
- (SC2IFP(vh)->if_drv_flags & IFF_DRV_RUNNING)) {
+ (SC2IFP(vh)->if_drv_flags & IFF_DRV_RUNNING) &&
+ vh->sc_state == MASTER) {
CARP_UNLOCK(cif);
return (ifa);
}
OpenPOWER on IntegriCloud