+ s.owner = myself;
+ send_del_subnet(c, &s);
+ return true;
+ }
+
+ /* In tunnel server mode, check if the subnet matches one in the config file of this node */
+
+ if(tunnelserver) {
+ config_t *cfg;
+ subnet_t *allowed;
+
+ for(cfg = lookup_config(c->config_tree, "Subnet"); cfg; cfg = lookup_config_next(c->config_tree, cfg)) {
+ if(!get_config_subnet(cfg, &allowed))
+ continue;
+
+ if(!subnet_compare(&s, allowed))
+ break;
+
+ free_subnet(allowed);
+ }
+
+ if(!cfg) {
+ logger(LOG_WARNING, "Ignoring unauthorized %s from %s (%s): %s",
+ "ADD_SUBNET", c->name, c->hostname, subnetstr);
+ return true;
+ }
+
+ free_subnet(allowed);