diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2016-10-25 07:21:03 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2016-10-25 07:21:03 +0000 |
commit | 1bea7fadac774dfab0d3c4f38ef12ab7994debe7 (patch) | |
tree | 0068e8bea81a7de3d05268ca9812c92911ab51c2 /sys/netinet | |
parent | a0f52adfdb18549b8512ac57c42550ea0b4731ba (diff) |
Accept CARP advertisement packets whose destination is not for multicast.
When both "carppeer" and "real mac-address" are used at once and the
BACKUP is to take over the new MASTER, the present MASTER receives
such packets. Found by and diff from nagasaka at iij.
ok henning bluhm
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_carp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 9eb5552cbb5..ff3ae78600d 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.294 2016/10/04 13:54:32 mpi Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.295 2016/10/25 07:21:02 yasuoka Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -453,7 +453,7 @@ carp_proto_input_if(struct ifnet *ifp, struct mbuf *m, int hlen) ismulti = IN_MULTICAST(ip->ip_dst.s_addr); /* check if received on a valid carp interface */ - if (!((ifp->if_type == IFT_CARP && ismulti) || + if (!(ifp->if_type == IFT_CARP || (ifp->if_type != IFT_CARP && !ismulti && ifp->if_carp != NULL))) { carpstats.carps_badif++; CARP_LOG(LOG_INFO, sc, |