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.
This commit is contained in:
Michael Tuexen 2023-01-26 22:55:22 +01:00
parent d3acb974b4
commit e2d14a04c5

View file

@ -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);
}