From 42381038ba2bcc15d8963cc23e7fccd6532170e0 Mon Sep 17 00:00:00 2001 From: thorkill Date: Mon, 30 Nov 2015 01:00:28 +0100 Subject: [PATCH] Forget nodes while forwarding subnet informations --- src/protocol_subnet.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/protocol_subnet.c b/src/protocol_subnet.c index cf6983be..9f7e52dc 100644 --- a/src/protocol_subnet.c +++ b/src/protocol_subnet.c @@ -119,7 +119,11 @@ bool add_subnet_h(connection_t *c, const char *request) { if(strictsubnets) { logger(DEBUG_ALWAYS, LOG_WARNING, "Ignoring unauthorized %s from %s (%s): %s", "ADD_SUBNET", c->name, c->hostname, subnetstr); - forward_request(c, request); + if ((!owner->status.reachable) && ((now.tv_sec - owner->last_state_change) >= keylifetime*2)) { + logger(DEBUG_CONNECTIONS, LOG_INFO, "Not forwarding informations about %s to ALL (%ld / %d)", owner->name, now.tv_sec - owner->last_state_change, keylifetime); + } else { + forward_request(c, request); + } return true; }