]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
SQL driver needs to be instantiated before starting connections
authorNick Porter <nick@portercomputing.co.uk>
Wed, 1 Feb 2023 09:54:22 +0000 (09:54 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 1 Feb 2023 18:45:24 +0000 (18:45 +0000)
src/modules/rlm_sql/rlm_sql.c

index b6f62d91fa512f37e49ac7c5a536384c57afa058..7db6e2f599b2a30fe334ef37328ad1e69d9546b7 100644 (file)
@@ -1149,6 +1149,14 @@ static int mod_instantiate(module_inst_ctx_t const *mctx)
                return -1;
        }
 
+       /*
+        *      Ensure the driver is instantiated before attempting connections
+        */
+       if (module_instantiate(inst->driver_submodule) < 0) {
+               cf_log_err(conf, "Failed instantiating SQL driver");
+               return -1;
+       }
+
        /*
         *      Initialise the connection pool for this instance
         */