]> git.meshlink.io Git - meshlink/blobdiff - src/protocol_auth.c
Stop using global variable mesh in conf.[ch].
[meshlink] / src / protocol_auth.c
index 3bd444ea7aa0f5c14d490ee926ac66dac17c0f83..7864ee58191b61b3b88804af0fb1b581fd638c8b 100644 (file)
@@ -314,17 +314,10 @@ bool id_h(connection_t *c, const char *request) {
                return false;
        }
 
-       if(bypass_security) {
-               if(!c->config_tree)
-                       init_configuration(&c->config_tree);
-               c->allow_request = ACK;
-               return send_ack(c);
-       }
-
        if(!c->config_tree) {
                init_configuration(&c->config_tree);
 
-               if(!read_host_config(c->config_tree, c->name)) {
+               if(!read_host_config(mesh, c->config_tree, c->name)) {
                        logger(DEBUG_ALWAYS, LOG_ERR, "Peer %s had unknown identity (%s)", c->hostname, c->name);
                        return false;
                }