Don't disconnect clients in TunnelServer mode who send unauthorised ADD_SUBNETs.
So that we are liberal in what we accept.
This commit is contained in:
parent
430c90412c
commit
5cddf5e52a
1 changed files with 4 additions and 4 deletions
|
@ -112,7 +112,7 @@ bool add_subnet_h(connection_t *c) {
|
||||||
|
|
||||||
for(cfg = lookup_config(c->config_tree, "Subnet"); cfg; cfg = lookup_config_next(c->config_tree, cfg)) {
|
for(cfg = lookup_config(c->config_tree, "Subnet"); cfg; cfg = lookup_config_next(c->config_tree, cfg)) {
|
||||||
if(!get_config_subnet(cfg, &allowed))
|
if(!get_config_subnet(cfg, &allowed))
|
||||||
return false;
|
continue;
|
||||||
|
|
||||||
if(!subnet_compare(&s, allowed))
|
if(!subnet_compare(&s, allowed))
|
||||||
break;
|
break;
|
||||||
|
@ -121,9 +121,9 @@ bool add_subnet_h(connection_t *c) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!cfg) {
|
if(!cfg) {
|
||||||
logger(LOG_WARNING, "Unauthorized %s from %s (%s) for %s",
|
logger(LOG_WARNING, "Ignoring unauthorized %s from %s (%s): %s",
|
||||||
"ADD_SUBNET", c->name, c->hostname, subnetstr);
|
"ADD_SUBNET", c->name, c->hostname, subnetstr);
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
free_subnet(allowed);
|
free_subnet(allowed);
|
||||||
|
|
Loading…
Reference in a new issue