summaryrefslogtreecommitdiffstats
path: root/sys/netinet/if_ether.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2011-12-29 15:59:14 +0000
committerglebius <glebius@FreeBSD.org>2011-12-29 15:59:14 +0000
commit6d9bb657995cb846b97c7558a0454afe42964b3a (patch)
treee93891e6c95193d25fe5ab217cff7d8e27232d93 /sys/netinet/if_ether.c
parent3224db6cd7f2df597a127db3d6b3be5ded482cd7 (diff)
downloadFreeBSD-src-6d9bb657995cb846b97c7558a0454afe42964b3a.zip
FreeBSD-src-6d9bb657995cb846b97c7558a0454afe42964b3a.tar.gz
Don't fallback to a CARP address in BACKUP state.
Diffstat (limited to 'sys/netinet/if_ether.c')
-rw-r--r--sys/netinet/if_ether.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 546714f..ff35d5e 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);
OpenPOWER on IntegriCloud