From 2784a171ec39e2a34aabf8194a651de570e19e0e Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Thu, 14 Jul 2016 19:15:35 +0100 Subject: [PATCH] Fix error handling when setting up the UDP socket. Due to this typo, if tinc managed to set up the TCP socket but not the UDP socket, it would continue anyway. The regression was introduced in 6bc5d626a8726fc23365ee705761a3c666a08ad4. --- src/net_setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net_setup.c b/src/net_setup.c index 4e1cacaf..b0a0c953 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -676,7 +676,7 @@ static bool add_listen_address(char *address, bool bindto) { int udp_fd = setup_vpn_in_socket((sockaddr_t *) aip->ai_addr); - if(tcp_fd < 0) { + if(udp_fd < 0) { close(tcp_fd); continue; } -- 2.20.1