X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_setup.c;h=a04f9535ae63746aaa97cf0c99aa5a2cc9f4d763;hb=dfed43f01b69fff92321d1194a6c7c7ba54ca2d0;hp=1ecb3c65f2cdf697ab111e946f7e8bedd5af5c1e;hpb=0f18410ebaf1c503e5d0ca9624b24df930561d7d;p=tinc diff --git a/src/net_setup.c b/src/net_setup.c index 1ecb3c65..a04f9535 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -231,7 +231,7 @@ static bool read_ecdsa_private_key(void) { return false; } - if(s.st_mode & ~0100700) { + if(s.st_mode & ~0100700u) { logger(DEBUG_ALWAYS, LOG_WARNING, "Warning: insecure file permissions for Ed25519 private key file `%s'!", fname); } @@ -323,7 +323,7 @@ static bool read_rsa_private_key(void) { return false; } - if(s.st_mode & ~0100700) { + if(s.st_mode & ~0100700u) { logger(DEBUG_ALWAYS, LOG_WARNING, "Warning: insecure file permissions for RSA private key file `%s'!", fname); } @@ -935,6 +935,8 @@ static bool setup_myself(void) { logger(DEBUG_ALWAYS, LOG_ERR, "UDPRcvBuf cannot be negative!"); return false; } + + udp_rcvbuf_warnings = true; } if(get_config_int(lookup_config(config_tree, "UDPSndBuf"), &udp_sndbuf)) { @@ -942,6 +944,8 @@ static bool setup_myself(void) { logger(DEBUG_ALWAYS, LOG_ERR, "UDPSndBuf cannot be negative!"); return false; } + + udp_sndbuf_warnings = true; } get_config_int(lookup_config(config_tree, "FWMark"), &fwmark); @@ -1326,7 +1330,7 @@ void close_network_connections(void) { if(myself && myself->connection) { subnet_update(myself, NULL, false); - connection_del(myself->connection); + free_connection(myself->connection); } for(int i = 0; i < listen_sockets; i++) {