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)
This commit is contained in:
Andrey V. Elsukov 2018-09-17 10:10:14 +00:00
parent 9d1b868da0
commit c6851ad04c

View File

@ -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) {