git: 4ffe410e40e9 - main - if_tuntap: improve code consistency

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Sat, 04 Nov 2023 09:39:37 UTC
The branch main has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=4ffe410e40e90c265c20cb4675ed74a40dc1fcc4

commit 4ffe410e40e90c265c20cb4675ed74a40dc1fcc4
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2023-11-04 09:22:42 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2023-11-04 09:22:42 +0000

    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
---
 sys/net/if_tuntap.c | 3 +--
 1 file changed, 1 insertion(+), 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) {