X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_setup.c;h=e7d3e40bd9f1e15df3a27cdaf94a9bb570a99f4f;hp=f4e56378889c09c1d008cf51e05cb05fdb43b48c;hb=8dfe1b374e165ecba5d3ae324ee834d337476be8;hpb=3f410e2f8f7c365630f226adf4904935698f9e0d diff --git a/src/net_setup.c b/src/net_setup.c index f4e56378..e7d3e40b 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -405,6 +405,20 @@ bool setup_myself(void) { } else maxtimeout = 900; + if(get_config_int(lookup_config(config_tree, "UDPRcvBuf"), &udp_rcvbuf)) { + if(udp_rcvbuf <= 0) { + logger(LOG_ERR, "UDPRcvBuf cannot be negative!"); + return false; + } + } + + if(get_config_int(lookup_config(config_tree, "UDPSndBuf"), &udp_sndbuf)) { + if(udp_sndbuf <= 0) { + logger(LOG_ERR, "UDPSndBuf cannot be negative!"); + return false; + } + } + if(get_config_string(lookup_config(config_tree, "AddressFamily"), &afname)) { if(!strcasecmp(afname, "IPv4")) addressfamily = AF_INET;