aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2005-11-17 12:56:40 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2005-11-17 12:56:40 +0000
commit218837618a4d73393e64bb6034a9ce5015448202 (patch)
treee916c47065562aedf56eb7d90e7eb4532ec56065 /sys
parent251bb62d63a7d92cc1db3fcfc42116869c0611df (diff)
Notes
Diffstat (limited to 'sys')
-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 23fd4fce815a7..048dad561d78d 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);
}