From nobody Sun Dec 19 14:45:20 2021 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 5D37718F7DEC; Sun, 19 Dec 2021 14:45:21 +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 4JH59Y0bF3z4vVD; Sun, 19 Dec 2021 14:45:21 +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 E88B8246EE; Sun, 19 Dec 2021 14:45:20 +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 1BJEjKBx072691; Sun, 19 Dec 2021 14:45:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BJEjKaq072690; Sun, 19 Dec 2021 14:45:20 GMT (envelope-from git) Date: Sun, 19 Dec 2021 14:45:20 GMT Message-Id: <202112191445.1BJEjKaq072690@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: 19592949abd2 - stable/13 - ipsec: fix a logic error in key_do_getnewspi 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 19592949abd2953a3c00cda59231113d29d4dd63 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639925121; 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=O3WPoNT1ew4zDX4erE+6n3Af6e8RRZwmlH7+IXQTM6E=; b=ND8fyYVkq8MqZYupXbN9Sc0Eevw391V8QKXuJ1M0bKIJFAWKnbnuR/szorr7V1EdPhzfKa 4q0X/qxINyz+rbU0tr1MPpBoxTWZG9nMWYXzj0nJgmVXw/DqDUZCyZA9T9eITAVQvEbGLA x3E9PvJDa+VmeXkSuQdOvtDB7VSYZieRhkHNqsNCqOKo7veasTChF2bCwCsNJUPrXJ8SlR T/BUB6R+i6+JUhL6ubGereyQ8D8vG7Vk4lknv7r/e4MD4nN1wBJzGFeSfPLggjXAFsty9k kwsA4mi0d6xqOMKHJb8pw6f1eSEE2FGodGKlkMI9Rkc+QEXNy0f5AJRnLO7Z0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639925121; a=rsa-sha256; cv=none; b=g75vJjkz6GkqlFnqxLESLr75NbS7AvUjQoKqkzeMg0N1gYNPYqBKsvvJ/kNyx0mPdYgZlS wYiGBgh14jHAvU6ymsB4Wgf/xv7xkE+jFgvNR0HlDEuGSM1f6kh3a0y+nZeXC7X9ikh/fd WAJZfEtNTxLSy72/8ddK+cgg2YVG8jjRGdD9DwY9p9pV4m0h2fetWPgygkEfAAzM29zZuU lZMnBM1SQgMCj3AJEXpebYZughxu553FoXYCNhIAm3qpJ2zSW3RtI29SixtJkvdv4XTjmO P6kWMiA4brMmvFi96ZyfrL03M4XpUcrCs6fv9Lti9/1ZdT0G8xGGuM95ofrzPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=19592949abd2953a3c00cda59231113d29d4dd63 commit 19592949abd2953a3c00cda59231113d29d4dd63 Author: Wenfeng Liu <266lwf@163.com> AuthorDate: 2021-11-24 09:34:32 +0000 Commit: Mateusz Guzik CommitDate: 2021-12-19 14:44:52 +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 71eaac7f8fa3..b9d867a1d83a 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -5023,7 +5023,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;