From nobody Tue Dec 14 19:31:02 2021 X-Original-To: dev-commits-src-main@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 2DC7018E777C; Tue, 14 Dec 2021 19:31:03 +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 4JD7lV6YGJz4spn; Tue, 14 Dec 2021 19:31:02 +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 C0D4C5EC2; Tue, 14 Dec 2021 19:31:02 +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 1BEJV2Sb019020; Tue, 14 Dec 2021 19:31:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BEJV2g6019019; Tue, 14 Dec 2021 19:31:02 GMT (envelope-from git) Date: Tue, 14 Dec 2021 19:31:02 GMT Message-Id: <202112141931.1BEJV2g6019019@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 509f1a0f405d - main - ipsec: fix a logic error in key_do_getnewspi List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 509f1a0f405daf0e2bdaa5b366d21b77052149c3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639510262; 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=pTsyB5jPdd0AgyL0NFsnBdEhSfAusP4/ZzZEbltYpHs=; b=lOinykL9mPJJlPtbBZRfUIb/iFoRw0pYecBK30VB+e6I/RCEp8qGOD2E7emOqUMfCSQYoW NGqAZlTKwrLHa7qRP5eOf+RdXVZfngWRBdfr4QeSjKZOY8Oeds43lfW1EYspsmfnjZAjnq StH1uRpAuO5uxkgnGVlVUL4EPMHHzMfRPtHcEbt14dmu3LCoztUvK94niPTWNw4+cDAwNE VkrQMa2GIv8KaSfyso/WIhDsW0MB7x2O99WjDplBuY/Vd2xAHWyNqnPLLI7xNA93BP3TRi xfSSjHoUDefNRLd0BkJWVmC+QR/m7AkoLE/9pNXZWuSfYCeX1w/xX+ByS58B0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639510262; a=rsa-sha256; cv=none; b=UvT9sE9aTg3OxAOrakKFzUXf0Wi5ZtNh/i4VWe/h4gzPz2YiGkSmwXsbxMRqd9Vqv/b26h xSc0fxBXK7s5/XJ0wF3NLq0tmqdQUu/rjRW7WlbbS0wPTIKaTyyblbIHImwjjrRjMdWoEI u7gNBLDZQ4Qae41s8Y2nmT1AbUCd0hBKUlvzXZk/66Fqr+z0J/sO50GQ6PZERSPT0qen23 DxzEgdagyCHM0DvXWsRsyKA52UROI4BoX93ObGeNvd20iz1ws6MInGUJ17I44Cw2zW2nIH g13NcYniak6QGSyIt/+nsSfC4ELe5CJ/RJQOS9sH1oVm9qL2MxCtCz9qiRB4vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=509f1a0f405daf0e2bdaa5b366d21b77052149c3 commit 509f1a0f405daf0e2bdaa5b366d21b77052149c3 Author: Wenfeng Liu <266lwf@163.com> AuthorDate: 2021-11-24 09:34:32 +0000 Commit: Mateusz Guzik CommitDate: 2021-12-14 19:30:42 +0000 ipsec: fix a logic error in key_do_getnewspi --- 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 4eb4c7c76464..9b3d10e28902 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -5055,7 +5055,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;