X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_setup.c;h=3ed6fbb0deb12dfa1d01e583428c668522274d39;hp=34320d8bccae08c2869246d33dbd3ffdb57614d7;hb=43b41e9095e6261c53da1ae46117d018296c3b68;hpb=07108117ceddaff0654f9def703e717c002f3e2d diff --git a/src/net_setup.c b/src/net_setup.c index 34320d8b..3ed6fbb0 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; } @@ -319,6 +320,8 @@ static void keyexpire_handler(void *data) { void regenerate_key(void) { logger(DEBUG_STATUS, LOG_INFO, "Expiring symmetric keys"); send_key_changed(); + for splay_each(node_t, n, node_tree) + n->status.validkey_in = false; } /* @@ -661,6 +664,9 @@ static bool add_listen_address(char *address, bool bindto) { hint.ai_protocol = IPPROTO_TCP; hint.ai_flags = AI_PASSIVE; +#if HAVE_DECL_RES_INIT + res_init(); +#endif int err = getaddrinfo(address && *address ? address : NULL, port, &hint, &ai); free(address);