sec_start needs to show bpf the packets going out.
authordlg <dlg@openbsd.org>
Tue, 15 Aug 2023 02:31:07 +0000 (02:31 +0000)
committerdlg <dlg@openbsd.org>
Tue, 15 Aug 2023 02:31:07 +0000 (02:31 +0000)
from and ok goda@
requested by many

sys/net/if_sec.c

index d7be990..76e9e30 100644 (file)
@@ -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)