From nobody Fri Jun 23 17:01:12 2023 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 4Qnk611BCXz4h2dC; Fri, 23 Jun 2023 17:01:13 +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 4Qnk610lDJz4JMf; Fri, 23 Jun 2023 17:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687539673; 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=eGLbarIMk8u5WLAWSs4uS1lsga5vwlpV51yPtY0tDG0=; b=TZU6dC/e310p2Tj1rI2yFfbMXdh6tvEJkTS75PNdNNsLosh0aDoeyWOpLXu3YuIYM7GeeM 5RDaZgIAzn4fukSyQqpCnsBLvzvWeXnsP23XCubiBBMpa4vxQmEljvCmq1VJvDfTCjJ4eu 1OIGfeKlF2gSmY29Kzf9jl5ZiSGC8q8LKlfkPZnxuiCVnJU7mPNruB3a5wyGHvcYor59vP i+YmX7RCLvuJ7zJS3vVHCS4q2sB+Q7W8uIxcPJL/0ALY5Zj5jFNrdxMUkYLdW/0YUstjHD nNbWbFSP1Mp8+Tgz/i5cBk3Tggj91bNLxYwRbp46NxGhT/g916618oSmMGqGQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687539673; 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=eGLbarIMk8u5WLAWSs4uS1lsga5vwlpV51yPtY0tDG0=; b=PASlvaGHLFamQFEDZT5zHvlFLD9pe/YyQme2arAsCe6xkMSR+tRWgg3UVMWHiAnOkRS5td RQgMcTAp3B4VmR6qxCmdZhP2NtSbjFID9wyMQPKMs6M2gKopwAce6ENs/yJBWXtvCDdhvp 7c/HyzZtH75+Re8a8Ox56X6lEeeH2v/TwOjjkPh+D6Ul5/zfDQpw350iXH3L+IFfg5HqG0 /Wtq3n9non9LxGLXVe5Z9860YIKOrTG9VdBYxPSyVfeyjH8VSFG6f0X+hJbKUiVAptqLhQ Hwu61abeI/7UrT4uprojWiAvVtHuMGFOvAMCyBq7jUiSoHANqhGGwvmDXIqrxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687539673; a=rsa-sha256; cv=none; b=bganJZAWMT4J24o0CLX/5afbiucm8RHcZMpY8iYpK8SmC/aiDtC3zs8eS75BYnzvZok4ae +YogIOJfrwBl0NsQo8w3P91+OqwQjrbpTbTx10SthSO9LhIrDH4tcSUiNgh0duu3ML/C5u tambn3fmtPw5iQuxXh53xjbRBehg/LUhCCVPWtgiXb1AsnCacFxBeu6p7/e9sZpNO3tAxb e75vWnbQvV7yqW+4D1e/NQKNQwLjRi8pQpvitDKKgQSCJnRF1sG5YF9YsrAOus8FkSIY9x WawggDyYB927M01bBO7i4DbBHHZxtcnkVakhVESOPwWXmVhSouQz1NJ5oUEf7Q== 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 4Qnk606wYyz1BR6; Fri, 23 Jun 2023 17:01: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 35NH1CrF029139; Fri, 23 Jun 2023 17:01:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35NH1CJT029138; Fri, 23 Jun 2023 17:01:12 GMT (envelope-from git) Date: Fri, 23 Jun 2023 17:01:12 GMT Message-Id: <202306231701.35NH1CJT029138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: ad9f4e6351fb - main - wg: fix MOD_LOAD to fail properly if cookie_init() fails 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad9f4e6351fb23ee81bc940638d20af3ca7c278d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ad9f4e6351fb23ee81bc940638d20af3ca7c278d commit ad9f4e6351fb23ee81bc940638d20af3ca7c278d Author: Kyle Evans AuthorDate: 2023-06-23 16:41:07 +0000 Commit: Kyle Evans CommitDate: 2023-06-23 16:55:00 +0000 wg: fix MOD_LOAD to fail properly if cookie_init() fails Previously we'd jump to the `free_crypto` label, but never set `ret` to a failure value -- it would retain success from the call just prior. Set ret up properly. This is part of D40708, but not the main point of the change. --- sys/dev/wg/if_wg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index d2403792cec8..77aed2621c9a 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -2996,7 +2996,8 @@ wg_module_init(void) ret = crypto_init(); if (ret != 0) goto free_zone; - if (cookie_init() != 0) + ret = cookie_init(); + if (ret != 0) goto free_crypto; wg_osd_jail_slot = osd_jail_register(NULL, methods);