From nobody Mon Feb 07 13:52:12 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 91C8B19AB3A2; Mon, 7 Feb 2022 13:52:16 +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 4JsndB0R4fz4yBH; Mon, 7 Feb 2022 13:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644241935; 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=gVu/onaxMB2hI88QH/lNUJNwXcGtZdBfgzLjVod/8IA=; b=NEf8du01d6SoIT9sOqyLN1eukmVGyrG79XPV9aQ6O6BNoD5DJA7QOnh2TLhAobAebz+3QN tYM6f4MNExvoAOLueDA5mS1NrTdHovUQO5Fcia64AVBEPUXwouv54Wplla+fBMcOK36pKo cjdYHmZbiQI9bKNzr4bXr8tsJVycWt25b+raMpBPfQE8ofMIAKMyThRL43ZH2AlfrrRPJw SUlswb6iQlo7iKY8vWGmicK1jvPJX7lz3CuLgrNm5RZZv4ys1SR+KhczDoWfJap5UwzZSK ZvJTKUM9cMy4ogFk2EKoB4v4L3pvHpNyqjvV9dmna77YgrrF7xScqEOwIsO97Q== 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 C95D526C86; Mon, 7 Feb 2022 13:52:12 +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 217DqCXN080563; Mon, 7 Feb 2022 13:52:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 217DqCKc080562; Mon, 7 Feb 2022 13:52:12 GMT (envelope-from git) Date: Mon, 7 Feb 2022 13:52:12 GMT Message-Id: <202202071352.217DqCKc080562@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: 80bbd5a14914 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 80bbd5a1491422d52db5f69e5100ddf0c2c21a1f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644241935; 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=gVu/onaxMB2hI88QH/lNUJNwXcGtZdBfgzLjVod/8IA=; b=Z6bRah6GJQBj9k9LYgtmPVRiwMaY83LZ2rHtKOGrLhfjqpvnUDsBc600tWER0RrROysae6 qVNkM1eupoS12HYgpkZhbSdvbdnmxbpHxIt6dlmcJQIakwtLeyt/NUfTnYHzC12b+fHmAe EoFPfCAeWdRfhzYjpbygAjdS445HooAsiLPBQ3Ck7O6e5YT/xXRnDGUWmdTRY0JmZkvJ81 va55ioTDjQgZEBWcEBw0MxPQw13vN0TwpQBiM0PkzqDG3dLAh4rZ7w9nCMJ1I+xsoHrc61 0rJNQb2NHLJUJz4qSagTBw9ff3Fw9HHtQh8B3O875ONL5gCHIFk3c8vovCyw8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644241935; a=rsa-sha256; cv=none; b=pTsmRjavGCml8dphiYMAePWNcGn+cPAsDJDCTOU8BTdQj6Nl/q1R4sfjHXXff833zKNsCk uUC5aeWjKgp99RTMrDHQ4LUP7kGvC68WTg09EHtdnBYN1f8kMTWDdDNbueKWeacW8qLin0 UyLypxZLBFD4Qhkcd+2Xdyz0GfYHhJEFIKboPxGBNveLNlHOdJaMJZYd3rDlCJzY2Itqn3 a0DnvREdohMTkqskImNv89DZl6QtAlln/bNH9PLDmp4MxGo7etSmKJs5kU/n2DuO1xcvOA L0tT0h30gxaRh98kN4hOSnjU9Aps1whL2Ap2HsdiKAZcRWEoy/kFF5Uaq1GEbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=80bbd5a1491422d52db5f69e5100ddf0c2c21a1f commit 80bbd5a1491422d52db5f69e5100ddf0c2c21a1f Author: Cy Schubert AuthorDate: 2022-01-10 17:45:27 +0000 Commit: Cy Schubert CommitDate: 2022-02-07 13:51:18 +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 986cca30c94d..72e2a42695c4 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -1081,10 +1081,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 {