Always call res_init() before getaddrinfo().
[tinc] / src / net_setup.c
index 92aa5db..c4f01b5 100644 (file)
@@ -857,14 +857,14 @@ static bool setup_myself(void) {
        }
 
        if(get_config_int(lookup_config(config_tree, "UDPRcvBuf"), &udp_rcvbuf)) {
-               if(udp_rcvbuf <= 0) {
+               if(udp_rcvbuf < 0) {
                        logger(DEBUG_ALWAYS, LOG_ERR, "UDPRcvBuf cannot be negative!");
                        return false;
                }
        }
 
        if(get_config_int(lookup_config(config_tree, "UDPSndBuf"), &udp_sndbuf)) {
-               if(udp_sndbuf <= 0) {
+               if(udp_sndbuf < 0) {
                        logger(DEBUG_ALWAYS, LOG_ERR, "UDPSndBuf cannot be negative!");
                        return false;
                }