aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2023-11-04 09:22:42 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2023-11-04 09:22:42 +0000
commit4ffe410e40e90c265c20cb4675ed74a40dc1fcc4 (patch)
tree09dc579718659738145d6af8e67ca9c6912e09c6
parentb0203aaa46fbf2a77cbce034b8b7928401649aa8 (diff)
downloadsrc-4ffe410e40e90c265c20cb4675ed74a40dc1fcc4.tar.gz
src-4ffe410e40e90c265c20cb4675ed74a40dc1fcc4.zip
if_tuntap: improve code consistency
No functional change intended. Reviewed by: rscheff MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D42462
-rw-r--r--sys/net/if_tuntap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c
index a01bc11aa64c..3eeaadb83a20 100644
--- a/sys/net/if_tuntap.c
+++ b/sys/net/if_tuntap.c
@@ -1413,8 +1413,7 @@ tunoutput(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
else
af = RO_GET_FAMILY(ro, dst);
- if (bpf_peers_present(ifp->if_bpf))
- bpf_mtap2(ifp->if_bpf, &af, sizeof(af), m0);
+ BPF_MTAP2(ifp, &af, sizeof(af), m0);
/* prepend sockaddr? this may abort if the mbuf allocation fails */
if (cached_tun_flags & TUN_LMODE) {