From 9de96e891c7f75f74104e419c043f626f93a67a4 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Thu, 29 Dec 2011 15:59:14 +0000 Subject: [PATCH] Don't fallback to a CARP address in BACKUP state. --- sys/netinet/if_ether.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 546714f68398..ff35d5e8b239 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -610,7 +610,9 @@ in_arpinput(struct mbuf *m) */ IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) - if (ifa->ifa_addr->sa_family == AF_INET) { + if (ifa->ifa_addr->sa_family == AF_INET && + (ifa->ifa_carp == NULL || + (*carp_iamatch_p)(ifa, &enaddr))) { ia = ifatoia(ifa); ifa_ref(ifa); IF_ADDR_UNLOCK(ifp);