Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jun 2024 04:22:00 GMT
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 215a18d502cb - main - if_enc(4): Prefer the boolean form when calling bpf_peers_present()
Message-ID:  <202406060422.4564M0hw054101@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=215a18d502cba2cf57251e82a84484219f2c432a

commit 215a18d502cba2cf57251e82a84484219f2c432a
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-06-06 04:20:26 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-06-06 04:20:26 +0000

    if_enc(4): Prefer the boolean form when calling bpf_peers_present()
    
    No functional change intended.
    
    MFC after:      1 week
---
 sys/net/if_enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/net/if_enc.c b/sys/net/if_enc.c
index 971afdabfff6..eaac0a843189 100644
--- a/sys/net/if_enc.c
+++ b/sys/net/if_enc.c
@@ -217,7 +217,7 @@ enc_bpftap(struct ifnet *ifp, struct mbuf *m, const struct secasvar *sav,
 	else if (hhook_type == HHOOK_TYPE_IPSEC_OUT &&
 	    (enc & V_bpf_mask_out) == 0)
 		return;
-	if (bpf_peers_present(ifp->if_bpf) == 0)
+	if (!bpf_peers_present(ifp->if_bpf))
 		return;
 	hdr.af = af;
 	hdr.spi = sav->spi;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202406060422.4564M0hw054101>