X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_key.c;h=1d471c80084181817ab3529821f9fac5675676f9;hp=6ff68d274cacf0eb842e33ace179913a322257b0;hb=63f8303a5dc1758876451a580a8317dbc3d295d6;hpb=67766d65f06854ee894d784f638c5c9cd2b50bca diff --git a/src/protocol_key.c b/src/protocol_key.c index 6ff68d27..1d471c80 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -34,13 +34,13 @@ #include "utils.h" #include "xalloc.h" -bool mykeyused = false; +static bool mykeyused = false; -void send_key_changed() { +void send_key_changed(void) { avl_node_t *node; connection_t *c; - send_request(broadcast, "%d %x %s", KEY_CHANGED, rand(), myself->name); + send_request(everyone, "%d %x %s", KEY_CHANGED, rand(), myself->name); /* Immediately send new keys to directly connected nodes to keep UDP mappings alive */ @@ -242,8 +242,6 @@ bool ans_key_h(connection_t *c) { /* Update our copy of the origin's packet key */ from->outkey = xrealloc(from->outkey, strlen(key) / 2); - - from->outkey = xstrdup(key); from->outkeylength = strlen(key) / 2; hex2bin(key, from->outkey, from->outkeylength);