From: Michael Tokarev Date: Sun, 24 May 2009 13:23:24 +0000 (+0400) Subject: tunnelserver: log which ADD_SUBNET was refused X-Git-Tag: release-1.0.10~60 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=a8a65cee083a27afe42cab360596e1453e7141b9;p=tinc tunnelserver: log which ADD_SUBNET was refused Add some logging about refused ADD_SUBNET (it causes subsequent client disconnect so it's important to know which subnet was at fault). Maybe we should just ignore it completely. --- diff --git a/src/protocol_subnet.c b/src/protocol_subnet.c index 3e5dadd1..d40b3a33 100644 --- a/src/protocol_subnet.c +++ b/src/protocol_subnet.c @@ -127,8 +127,11 @@ bool add_subnet_h(connection_t *c) free_subnet(allowed); } - if(!cfg) + if(!cfg) { + logger(LOG_WARNING, _("Unauthorized %s from %s (%s) for %s"), + "ADD_SUBNET", c->name, c->hostname, subnetstr); return false; + } free_subnet(allowed); }