From nobody Mon Jun 17 04:28:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2cLm5Lqnz5NFql; Mon, 17 Jun 2024 04:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2cLm4mTHz4tVs; Mon, 17 Jun 2024 04:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718598480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yqnzHO+qDazP9cJfxnM6bBGa4Rck1uOIiXuwAaKCLx4=; b=Tk1lYho8cGtUuxlKYQ/eL2SjdqsSp9lXeGdf2wbbiBV/oaoc4a7a6OQWjfoTw/QM/b5oDM xYF5LAdhIZ9Veg4kovcqPzW1QztpWM7zWn3Os8K7ieWrGJ4vey9aAXRK5N/z9RzKGncS3N yk7hqTH5dXpyXvJVZ36fIgdWoO5mKQM9FO2MxU+LxmG/q0dEBYnzUyIRfVzWElB7lTgxzX ug2sZAOF6ha0faFCagt9T4nm2wRpAe34bl9ECZr1CRjAAZ+15XaJajZaipH0Gg0N3neMxt Pqn2cnDOo3+CQBJ9bhuM1/UBM7SFckCzKYTAwAayCMw65mbn+xzBH/rgOx5hIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718598480; a=rsa-sha256; cv=none; b=HBI4eTqgESUDHRR/jXZR5irVuXKdIdAlnKOIJWJTS8I/qKOgSp5bzuSNG9n8ZcZ3jwX/7G 1GwZVRY4pR9duFXgFN7epf6WcAXiVTFUA+1W+cZoaIdW/KZuYyjnE9XpMhvTrQl9i0I1qh nLdLDqaSto1UlvDFVe7JZ11l2AxF2Ilj5v/A7qfGezqCU0JCAPaBS1ih3fnGJ7A2Csp9vi pIf8Z6OzZvYTp1ZuYqVriyyChi/7HiccBBYXGCv8L9O7H3tTsC5ql0fqtynSF9c94FmMR1 i0FU1ppsXIXbxSDCRkhpAQRMA6mQSiyfrRveqPpqxclbBXGu0plb+JszyIbWqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718598480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yqnzHO+qDazP9cJfxnM6bBGa4Rck1uOIiXuwAaKCLx4=; b=dezyJfvL0IdPFfomEV7nAi/DWSS6j/2OtdXhC5Ym9sz4bIT5oipQ7Fmobhel2F79B+ZaUL T4/UIBQf6j91tmeC9gPCFa3YlBxRBu2tNqTs/g23oGMUTyh1mivD2768lUwUiJtmMoM93j kolnpzs9AJXoJC43Bt8hyCw2q0Xl/p7FF1deUpPCTWwn6r8dvInd3ZNNaX0y1npkpBANwZ oiklYgypzKRTK8+oEM7WcDwyquZ0d18h+aUENlrWgdNBU6BAMbTUH1Yxe3IbnrQKCa4cgJ keoedicwrwUEE73bv5OvRskKWI+sSNnDq0C36t2CnfLgacC4mKqDprxxuofrNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2cLm4Mpvz1GLx; Mon, 17 Jun 2024 04:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45H4S0lB073932; Mon, 17 Jun 2024 04:28:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45H4S0To073929; Mon, 17 Jun 2024 04:28:00 GMT (envelope-from git) Date: Mon, 17 Jun 2024 04:28:00 GMT Message-Id: <202406170428.45H4S0To073929@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 43bb3553f1d5 - stable/13 - if_enc(4): Prefer the boolean form when calling bpf_peers_present() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 43bb3553f1d523eec20d4078bf9bdaa222323940 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=43bb3553f1d523eec20d4078bf9bdaa222323940 commit 43bb3553f1d523eec20d4078bf9bdaa222323940 Author: Zhenlei Huang AuthorDate: 2024-06-06 04:20:26 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-17 04:10:11 +0000 if_enc(4): Prefer the boolean form when calling bpf_peers_present() No functional change intended. MFC after: 1 week (cherry picked from commit 215a18d502cba2cf57251e82a84484219f2c432a) (cherry picked from commit a674f992a135728648908874034408d43b3d1903) --- 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 cf7f763c33c6..752fbf207fb4 100644 --- a/sys/net/if_enc.c +++ b/sys/net/if_enc.c @@ -216,7 +216,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;