diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2018-01-12 23:29:38 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2018-01-12 23:29:38 +0000 |
commit | d7cd63481e4f3d4064a8cb1315cfd4c67a6b443c (patch) | |
tree | c9871f00b1063127c019cab2df1fd630bf38beb1 /sys | |
parent | ab5739f17cf2ce7b7473226afd323b1b002cb951 (diff) |
unbreak configurations using carppeers
ip_carp.c r1.322 removed the ability to receive carp protocol packets
on !IFT_CARP interfaces. however, carppeers cause the carp protocol
packets to be directed to a unicast address on another interface,
which definitely is not mapped back to a carp interface.
this brings back the ability to get carp packets on parent interfaces.
it is a bit different to a backout because it only allows carp
parents to be ethernet interfaces.
mpi@ told me carp regress tests were failing.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_carp.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 0faae326d2f..bb9fa4220bd 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.325 2018/01/12 00:36:13 dlg Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.326 2018/01/12 23:29:37 dlg Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -450,7 +450,14 @@ carp_proto_input_if(struct ifnet *ifp, struct mbuf **mp, int *offp, int proto) ismulti = IN_MULTICAST(ip->ip_dst.s_addr); /* check if received on a valid carp interface */ - if (ifp->if_type != IFT_CARP) { + switch (ifp->if_type) { + case IFT_CARP: + break; + case IFT_ETHER: + if (ismulti || !SRPL_EMPTY_LOCKED(&ifp->if_carp)) + break; + /* FALLTHROUGH */ + default: carpstat_inc(carps_badif); CARP_LOG(LOG_INFO, sc, ("packet received on non-carp interface: %s", |