Revert "pfsync: Correctly check if bpf peers are present"

This reverts commit 1d4942b27f.
This commit is contained in:
Franco Fichtner 2024-07-17 11:53:06 +02:00
parent 8fe89ff802
commit de60ffe06f

View file

@ -1792,7 +1792,7 @@ pfsync_sendout(int schedswi, int c)
("%s: sc_len %zu", __func__, b->b_len));
PFSYNC_BUCKET_LOCK_ASSERT(b);
if (!bpf_peers_present(ifp->if_bpf) && sc->sc_sync_if == NULL) {
if (ifp->if_bpf == NULL && sc->sc_sync_if == NULL) {
pfsync_drop(sc);
return;
}
@ -1921,10 +1921,10 @@ pfsync_sendout(int schedswi, int c)
V_pfsyncstats.pfsyncs_oacts[PFSYNC_ACT_EOF]++;
/* we're done, let's put it on the wire */
if (bpf_peers_present(ifp->if_bpf)) {
if (ifp->if_bpf) {
m->m_data += aflen;
m->m_len = m->m_pkthdr.len = len - aflen;
bpf_mtap(ifp->if_bpf, m);
BPF_MTAP(ifp, m);
m->m_data -= aflen;
m->m_len = m->m_pkthdr.len = len;
}