Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jan 2023 21:59:07 GMT
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e2d14a04c5fc - main - tcp: improve error handling of net.inet.tcp.udp_tunneling_port
Message-ID:  <202301262159.30QLx72g092841@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=e2d14a04c5fc49ad1aab280e3c2e7283bbacc948

commit e2d14a04c5fc49ad1aab280e3c2e7283bbacc948
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2023-01-26 21:55:22 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
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);
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202301262159.30QLx72g092841>