From nobody Mon Feb 07 13:56:11 2022 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 F373619B14C7; Mon, 7 Feb 2022 13:56:15 +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 4Jsnjp1by9z5227; Mon, 7 Feb 2022 13:56:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644242175; 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=mZ5II3TabJOfNZ2aKVOyIbYMedGOkFLTqqLdFix7u7A=; b=ud9eLcedzazea+0DT8j0fwC+nB/bjwaGzi5Gu9cdcK4R9elaNUbkQX4uRN2mckDVr7SLFn 2TcAH3BM8ZvQjlWVbnJsX/lGX8NzuIdOMcjW1g0X1FH6i2grFs2sLqbWly+LYXOCscSgpl VWLVeu9sXDqIqTCfJh8rlozfkMTNIGOF0jSQSOI5Rgnl2DeiMMqRRkUlhJiS53mQTS1RhN 6z6FglZ/xVm6ft5oxqSG87JCYyy6DFZHC5HNhGarI0f4BewMhDfbQIeG/p8FEHSRBOfqQ9 HG8vo0pZRqPZ4fTK3LoaRqIYjPHsNMReDBb3dJ6AVcnWrm/zEIEg37OFoLUmFw== 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 E50BD26DA4; Mon, 7 Feb 2022 13:56:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 217DuBdo085575; Mon, 7 Feb 2022 13:56:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 217DuBhB085574; Mon, 7 Feb 2022 13:56:11 GMT (envelope-from git) Date: Mon, 7 Feb 2022 13:56:11 GMT Message-Id: <202202071356.217DuBhB085574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: c439e17595f4 - stable/12 - ipfilter: Remove redundant else if 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c439e17595f455fc233c363d231c3e02e792f4ca Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644242175; 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=mZ5II3TabJOfNZ2aKVOyIbYMedGOkFLTqqLdFix7u7A=; b=l9ZHyhFVhWAdhMmxRy8tv3zaQBeoJnGqsh3DimREwvbHO0NN5mYleXyzhPJlWx56mvIMFr GCnUNlNnMwzK3lqc5rqHYD1ofEv5NtqM1BeXHRLzYaWve17hQGvvTFJl/tYBfEhD56tnd0 v7x7Vm+yT2vVccX5Tgy0/e4fxOHqpRCqbb7/ndIUnjpPhSPacaDJsk2SA/wvP4nwQJ8GWS SgYRYfXcU5stIqfM/QfI4xywmh/grutkE/jPuWzca+fpVwIhJIEUyXC2c91DUsgICKcXxD 4goNWlcRHcrI2jTMqh5W2B0yRy/cjN6xyEL+zG8vNSSMM5Ipre8XN7aKu7qR2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644242175; a=rsa-sha256; cv=none; b=UJNiJqmnJ9eBhmhPCDYNDQp21zgK89dvAd45b19e9AAfm6kj22yV3JMBdZ+ErRcrFkrtDN P8gF/odzu/SsL3skSxexnoCyXNo93K9IKPaq29+hfFFolfXjg50SxbUpG0OpWvlqrQ8Em1 HDeiRcctRL7+JqSVuRt5cnoF/QCiZEAGi2BTQBq9++d7au+2XTL0tHgvSiyBDWy5i2xqRX RNghBuY9so4T7i+OM+Y1OVklt47EoiFUPyk9JoipigslvGEUsh0KqHyauAbSZfh/UU50wR EFRa8S4SzkFfsLrhFKKpw7icaLYWnKomARjeX5rz0pAe8RZf3x0YcqFyQkmN2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c439e17595f455fc233c363d231c3e02e792f4ca commit c439e17595f455fc233c363d231c3e02e792f4ca Author: Cy Schubert AuthorDate: 2022-01-10 17:45:27 +0000 Commit: Cy Schubert CommitDate: 2022-02-07 13:55:14 +0000 ipfilter: Remove redundant else if Combine two else ifs using an or. (cherry picked from commit f98cc177f7b8afae670f28adf2b88cc00b990bf7) --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 0eb9ee59a987..315d570141dc 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -1086,10 +1086,8 @@ ipf_checkv4sum(fr_info_t *fin) fin->fin_cksum = FI_CK_L4FULL; return (0); } else if (m->m_pkthdr.csum_flags == CSUM_TCP || - m->m_pkthdr.csum_flags == CSUM_UDP) { - fin->fin_cksum = FI_CK_L4PART; - return (0); - } else if (m->m_pkthdr.csum_flags == CSUM_IP) { + m->m_pkthdr.csum_flags == CSUM_UDP || + m->m_pkthdr.csum_flags == CSUM_IP) { fin->fin_cksum = FI_CK_L4PART; return (0); } else {