1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00

Don't fallback to a CARP address in BACKUP state.

This commit is contained in:
Gleb Smirnoff 2011-12-29 15:59:14 +00:00
parent 4eda7b08af
commit 9de96e891c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228959

View File

@ -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);