X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_setup.c;h=334ea5d16886df2b97d5efa27abfd9441fd20680;hp=8ae1e72bbaafd3d90cd1118c2faa3085b36032cb;hb=24e3ec863ec463186501f76961c6d4b1dfe122af;hpb=2eba7933053d7d21bf82e647978ee90abe98dc3a diff --git a/src/net_setup.c b/src/net_setup.c index 8ae1e72b..334ea5d1 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -711,7 +711,12 @@ static bool setup_myself(void) { get_config_bool(lookup_config(config_tree, "TunnelServer"), &tunnelserver); strictsubnets |= tunnelserver; - + if(get_config_int(lookup_config(config_tree, "MaxConnectionBurst"), &max_connection_burst)) { + if(max_connection_burst <= 0) { + logger(DEBUG_ALWAYS, LOG_ERR, "MaxConnectionBurst cannot be negative!"); + return false; + } + } if(get_config_int(lookup_config(config_tree, "UDPRcvBuf"), &udp_rcvbuf)) { if(udp_rcvbuf <= 0) {