From nobody Sun Dec 19 14:46:07 2021 X-Original-To: dev-commits-src-branches@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 AEFBC18F86CF; Sun, 19 Dec 2021 14:46:07 +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 4JH5BR32lnz3BsC; Sun, 19 Dec 2021 14:46:07 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 4921B24451; Sun, 19 Dec 2021 14:46:07 +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 1BJEk7u1072854; Sun, 19 Dec 2021 14:46:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BJEk7LL072853; Sun, 19 Dec 2021 14:46:07 GMT (envelope-from git) Date: Sun, 19 Dec 2021 14:46:07 GMT Message-Id: <202112191446.1BJEk7LL072853@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: b19071bdff2d - stable/12 - ipsec: fix a logic error in key_do_getnewspi List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b19071bdff2d383654f45c27d744544088087a65 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639925167; 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=x1z8tzlmXMATx+0ik1kpiESptqIvr6pCbNxdBtqxUEI=; b=RbWi9m0QBF/4d2tpiSdYxe835ctoH5OsJSvRaWmHtW+5rqx45sDf2l5ZVoaxiQxYxp9AP2 0A5KzUzq9CeZ01uRhFvQtu/izXhvlaHwy1RcxSCEpvAeZUg5hejc4LLBMex3IrzRgKSuCb PwHt+1GCb4L1y2o3qkXyg2PNVLe7REqIuGxc5WIDFJjBDGj6Sx6/tkWNxbihQKZwTR5XJ2 dBOm16KRmNzcPzKrV886W5LZX/AIO6AOZH8zq7mD9IFh+lNmvSzzwikPhGHgXQyaaN6BKa +28Er5oFl+OpNAzFJQomAAptg9M//gFqKshMXuQTiTtTLGqLH5y9LSeUWU16Nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639925167; a=rsa-sha256; cv=none; b=aDg4HFh1c0rvBpKobgaf3+M+FeXPHCFQ3Oc/JnFBGqSG8qClCKS58jz6Mzgj71hq2cuSRQ DoUMlzZluA0dpEUOO9rCisFQIMvy3wxzK+73QYZzJvOj5xbw/4pCB+3HdBmrx3hOEvPTqq vCQIMjNVO0gfBXGsJ0d3gBHKA2vaD5zfGF5S6qPrhn71N7ookdORen0nYnXMOgMXVuSiMP uAzS7ksPDeuxrdQUR4EKRoFMv+TBBK0vg25lW167F1u2b0Tt/GU7dh7WrGU/dnfXiSRtGZ x7953YG/lE45NvVs4jG6hL8OoFuiZmCmMDhtkyR8y8sBjyfCJfI2RCQMxdwhKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b19071bdff2d383654f45c27d744544088087a65 commit b19071bdff2d383654f45c27d744544088087a65 Author: Wenfeng Liu <266lwf@163.com> AuthorDate: 2021-11-24 09:34:32 +0000 Commit: Mateusz Guzik CommitDate: 2021-12-19 14:45:59 +0000 ipsec: fix a logic error in key_do_getnewspi (cherry picked from commit 509f1a0f405daf0e2bdaa5b366d21b77052149c3) --- sys/netipsec/key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index d1119413f143..efe4ee519659 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -5064,7 +5064,7 @@ key_do_getnewspi(struct sadb_spirange *spirange, struct secasindex *saidx) } if (min == max) { - if (!key_checkspidup(htonl(min))) { + if (key_checkspidup(htonl(min))) { ipseclog((LOG_DEBUG, "%s: SPI %u exists already.\n", __func__, min)); return 0;