]> git.meshlink.io Git - meshlink/commitdiff
Fix check for succesful opening of UDP ports.
authorGuus Sliepen <guus@meshlink.io>
Sat, 7 Nov 2015 22:24:48 +0000 (22:24 +0000)
committerGuus Sliepen <guus@meshlink.io>
Sun, 25 Jun 2017 08:45:12 +0000 (10:45 +0200)
src/net_setup.c

index a2c441417b8e988b78118fbab1daa8b029726614..8cfacc3a89188c4660f24a7b458bf23e721ba465 100644 (file)
@@ -293,7 +293,7 @@ static bool add_listen_address(meshlink_handle_t *mesh, char *address, bool bind
 
                int udp_fd = setup_vpn_in_socket(mesh, (sockaddr_t *) aip->ai_addr);
 
-               if(tcp_fd < 0) {
+               if(udp_fd < 0) {
                        close(tcp_fd);
                        continue;
                }