]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
no name2 and NULL means it's a match
authorAlan T. DeKok <aland@freeradius.org>
Tue, 31 Aug 2021 13:40:04 +0000 (09:40 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 31 Aug 2021 13:40:04 +0000 (09:40 -0400)
src/lib/server/module.c

index dfe31a86564ab8952e4cc866a0d059293e7c76b8..169d95a6e13c47de3a1f8989dce41f836e237943 100644 (file)
@@ -939,10 +939,11 @@ module_instance_t *module_by_name_and_method(module_method_t *method, rlm_compon
        if (!q) {
                for (j = 0; mi->module->method_names[j].name1 != NULL; j++) {
                        methods = &mi->module->method_names[j];
+
                        /*
                         *      If we do not have the second $method, then ignore it!
                         */
-                       if (methods->name2 != CF_IDENT_ANY) continue;
+                       if (methods->name2 && (methods->name2 != CF_IDENT_ANY)) continue;
 
                        /*
                         *      Wildcard match name1, we're