From nobody Thu Jan 26 21:59:07 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 4P2vk41SMGz3c6XH; Thu, 26 Jan 2023 21:59:08 +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 4P2vk40mmcz3slV; Thu, 26 Jan 2023 21:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674770348; 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=0v6R1UtkxDb1fD5hxoXIwaAiSVY0Ltt4y2dAk0fk/j4=; b=vua8M7RKLmb8c5Bv19wW8fyTCnTw7yrWnRChfKwWZe6sgbvOP5Ef+WiGETQzb3mmv6UhC9 WORsWSz+pdiwiXeR3yfnNFJWDWcSbNQVf84Zcjjsf2/PLmPwpGWZFGEiLLg94SDsQBVZVs z+poyng+xIgDrpy1+0FSLlB6nhhPEmjXeigs9Z2ctHhmVQTOxLQBkuHTSjp8lU6JY1c9wY mReSH0vOmsqq13UA0NlfMWpFowi5zQklXLeR27FcNsJbaRKvF7tXskw5ejI7NYbowgWCpW Iy0BhJHEYcndS8/uiQCvaD7fP+v8gXCaVNj8Bygc3AQ7wzmfLglpba+KvKaeLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674770348; 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=0v6R1UtkxDb1fD5hxoXIwaAiSVY0Ltt4y2dAk0fk/j4=; b=rzPJ7moWaoafSEVkeyBmSPQUC2BO1GAlQdiqiq8HxZhjdWTST5ouLGS/8Kwft94Wc6dIWz xjQL2DdmC2I9EA8Dl2ZVGKxZPi8Pz4C5A3g40Er2uTyEggdHbCrNdL/STJXYCM4x1rokbR O1JpckJXs3HtdJuohhFNM7ANSGF0yINznMLeAza5fdLCeLjQhHn07fPnrvKxG9zoWN4Ku2 6oNGj0lLqoUwtpR7APE+kl2SeFe2HnSqbu9UKXYQQEiDKijKE4ZrTd+W3hsL5vcraGV0H/ IUYLMkhYDGT3F2GYtXqHjmlMJd/Va6I4LTxu+dd/ZDmdihnVgkIiusF7O7LbDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674770348; a=rsa-sha256; cv=none; b=A0f1W4HieQ0SkuuAl1Y9X9DIWfOQLJ13kZ+0IELco8UDy9R/JnbiMw8/TuPGwJTJufAcm2 Ekgi/L9poVBa6E6nmqlo3gxSCbsSaeYqh/AtAVE6JLCIHG75MIR2I7sNpP0I6/KJ6twtrj eFG7gtmjDwwy3b7EzRnMbU1DEbpUB7phmuHVMG6j3wjhL0GyUUZV1LxNHZN94NeBa/db5p e99fiF05dMoIyRl+8GASf/Zwl+T/FBra1gFAlau8DYN0/7YMaQHFyJvVY72KYWyjStfYws XN/82eEXyOF82ejomnG9KhCKaX53BHscWobfmpWOzORmr7MyowBFJTXroIgkww== 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 4P2vk36yTdzlVs; Thu, 26 Jan 2023 21:59: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 30QLx7Yh092842; Thu, 26 Jan 2023 21:59:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30QLx72g092841; Thu, 26 Jan 2023 21:59:07 GMT (envelope-from git) Date: Thu, 26 Jan 2023 21:59:07 GMT Message-Id: <202301262159.30QLx72g092841@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: e2d14a04c5fc - main - tcp: improve error handling of net.inet.tcp.udp_tunneling_port 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e2d14a04c5fc49ad1aab280e3c2e7283bbacc948 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e2d14a04c5fc49ad1aab280e3c2e7283bbacc948 commit e2d14a04c5fc49ad1aab280e3c2e7283bbacc948 Author: Michael Tuexen AuthorDate: 2023-01-26 21:55:22 +0000 Commit: Michael Tuexen CommitDate: 2023-01-26 21:55:22 +0000 tcp: improve error handling of net.inet.tcp.udp_tunneling_port In case the new port can't be set, set the port to 0. MFC after: 3 days Sponsored by: Netflix, Inc. --- sys/netinet/tcp_subr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 9828529634bc..99fcd1f90a8a 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -903,6 +903,9 @@ sysctl_net_inet_tcp_udp_tunneling_port_check(SYSCTL_HANDLER_ARGS) } if (new != 0) { error = tcp_over_udp_start(); + if (error != 0) { + V_tcp_udp_tunneling_port = 0; + } } sx_xunlock(&tcpoudp_lock); }