From c6851ad04cf6be2ead6a46f9c5523c59ddf8301f Mon Sep 17 00:00:00 2001 From: "Andrey V. Elsukov" Date: Mon, 17 Sep 2018 10:10:14 +0000 Subject: [PATCH] Restore outbound packets capturing for if_gre(4). It was missed in r335048. Also clear M_MCAST and M_BCAST flags for encapsulated datagram, since it will have new IP header. Approved by: re (kib) --- sys/net/if_gre.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 591396c588dd..a2b923ee04e9 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -569,6 +569,8 @@ gre_transmit(struct ifnet *ifp, struct mbuf *m) goto drop; } af = m->m_pkthdr.csum_data; + BPF_MTAP2(ifp, &af, sizeof(af), m); + m->m_flags &= ~(M_BCAST|M_MCAST); M_SETFIB(m, sc->gre_fibnum); M_PREPEND(m, sc->gre_hlen, M_NOWAIT); if (m == NULL) {