X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_setup.c;h=c4f01b56fde078cedfc4aec1d26a2aec9d742868;hb=95921696a49d1eff058880c90a80efd208de959d;hp=d1d5c04be36ff5bfbbe002b106551a789a1635f2;hpb=cffcaf966b65a61943a00120f1ec5c868c917c1f;p=tinc diff --git a/src/net_setup.c b/src/net_setup.c index d1d5c04b..c4f01b56 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -518,6 +518,9 @@ bool setup_myself_reloadable(void) { get_config_int(lookup_config(config_tree, "UDPDiscoveryInterval"), &udp_discovery_interval); get_config_int(lookup_config(config_tree, "UDPDiscoveryTimeout"), &udp_discovery_timeout); + get_config_int(lookup_config(config_tree, "MTUInfoInterval"), &mtu_info_interval); + get_config_int(lookup_config(config_tree, "UDPInfoInterval"), &udp_info_interval); + get_config_bool(lookup_config(config_tree, "DirectOnly"), &directonly); get_config_bool(lookup_config(config_tree, "LocalDiscovery"), &localdiscovery); @@ -664,7 +667,7 @@ static bool add_listen_address(char *address, bool bindto) { hint.ai_protocol = IPPROTO_TCP; hint.ai_flags = AI_PASSIVE; -#ifdef HAVE_DECL_RES_INIT +#if HAVE_DECL_RES_INIT res_init(); #endif int err = getaddrinfo(address && *address ? address : NULL, port, &hint, &ai); @@ -854,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; }