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.
-/* $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.
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",