X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_setup.c;h=fee4159fabc16ed9bfb096452e8cd4cb12f14514;hb=94f49a163aa570ea272bf3bbd7734187098d88b7;hp=7f51fe4b46c938e1b9ef552c75d4e3831e9c1681;hpb=0b310bf406dbe58afe37fa31156b9ea47599d7be;p=tinc diff --git a/src/net_setup.c b/src/net_setup.c index 7f51fe4b..fee4159f 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -137,10 +137,11 @@ bool read_ecdsa_public_key(connection_t *c) { } c->ecdsa = ecdsa_read_pem_public_key(fp); - fclose(fp); - if(!c->ecdsa) + if(!c->ecdsa && errno != ENOENT) logger(DEBUG_ALWAYS, LOG_ERR, "Parsing Ed25519 public key file `%s' failed.", fname); + + fclose(fp); free(fname); return c->ecdsa; } @@ -853,14 +854,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; }