From: dlg Date: Tue, 15 Aug 2023 02:31:07 +0000 (+0000) Subject: sec_start needs to show bpf the packets going out. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a3e56974213b5ca8dd2c869149e2b797ccd9109a;p=openbsd sec_start needs to show bpf the packets going out. from and ok goda@ requested by many --- diff --git a/sys/net/if_sec.c b/sys/net/if_sec.c index d7be990a71f..76e9e309073 100644 --- a/sys/net/if_sec.c +++ b/sys/net/if_sec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sec.c,v 1.5 2023/08/11 02:34:56 dlg Exp $ */ +/* $OpenBSD: if_sec.c,v 1.6 2023/08/15 02:31:07 dlg Exp $ */ /* * Copyright (c) 2022 The University of Queensland @@ -366,6 +366,12 @@ sec_send(void *arg) pf_pkt_addr_changed(m); #endif +#if NBPFILTER > 0 + if (ifp->if_bpf) + bpf_mtap_af(ifp->if_bpf, m->m_pkthdr.ph_family, m, + BPF_DIRECTION_OUT); +#endif + error = ipsp_process_packet(m, tdb, m->m_pkthdr.ph_family, /* already tunnelled? */ 0); if (error != 0)