diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 9828529634b..99fcd1f90a8 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); }