]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Print regex capture groups too
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 5 Dec 2021 03:15:45 +0000 (22:15 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 5 Dec 2021 03:15:56 +0000 (22:15 -0500)
src/lib/unlang/xlat_eval.c

index ce9ac35f8d59a72da2b8fd6747443c9a32972635..3fbb5f712362af2640f647279a7048625e9ce679 100644 (file)
@@ -111,7 +111,12 @@ static char *xlat_fmt_aprint(TALLOC_CTX *ctx, xlat_exp_t const *node)
                return talloc_asprintf(ctx, "%%{%s}", node->fmt);
 
        case XLAT_VIRTUAL:
-               return talloc_asprintf(ctx, "%%{%s}", node->call.func->name);;
+               return talloc_asprintf(ctx, "%%{%s}", node->call.func->name);
+
+#ifdef HAVE_REGEX
+       case XLAT_REGEX:
+               return talloc_asprintf(ctx, "%%{%u}", node->regex_index);
+#endif
 
        case XLAT_FUNC:
        {