bpf is not called on multicast/broadcast packets arriving to the carp
interface. this allows us to setup drop filters and allows tcpdump to
show all the packets.
OK/not-OK?
Index: ip_carp.c
===================================================================
RCS file: /home/cvs/src/sys/netinet/ip_carp.c,v
retrieving revision 1.181
diff -u -p -u -p -r1.181 ip_carp.c
--- ip_carp.c 8 Mar 2011 22:53:28 -0000 1.181
+++ ip_carp.c 31 Mar 2011 13:02:43 -0000
@@ -1580,6 +1580,11 @@ carp_input(struct mbuf *m, u_int8_t *sho
if (m0 == NULL)
continue;
m0->m_pkthdr.rcvif = &vh->sc_if;
+#if NBPFILTER > 0
+ if (vh->sc_if.if_bpf)
+ bpf_mtap_hdr(vh->sc_if.if_bpf, (char *)&eh,
+ ETHER_HDR_LEN, m0, BPF_DIRECTION_IN);
+#endif
ether_input(&vh->sc_if, &eh, m0);
}
return (1);