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.
This commit is contained in:
Michael Tokarev 2009-05-24 17:23:24 +04:00 committed by Guus Sliepen
parent 4e9e3ca89d
commit a8a65cee08

View file

@ -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);
}