From dff17433222fa48c81e16eebc167076c5303d6cb Mon Sep 17 00:00:00 2001 From: thorkill Date: Mon, 30 Nov 2015 00:22:51 +0100 Subject: [PATCH] Do not forward informations about other nodes if they are not reachable and the last_state_change is larger than 2 x KeyExpire --- src/protocol_auth.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 21e94f5c..8799e04b 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -744,8 +744,11 @@ static void send_everything(connection_t *c) { } for splay_each(node_t, n, node_tree) { - if ((n->last_state_change > 0) && (now.tv_sec - n->last_state_change >= 3600)) + if ((!n->status.reachable) && ((now.tv_sec - n->last_state_change) >= keylifetime*2)) { + logger(DEBUG_CONNECTIONS, LOG_INFO, "Not forwarding informations about %s to %s (%ld / %d)", n->name, + c->name, now.tv_sec - n->last_state_change, keylifetime); continue; + } for splay_each(subnet_t, s, n->subnet_tree) send_add_subnet(c, s);