From: Alan T. DeKok Date: Thu, 12 Aug 2021 15:07:36 +0000 (-0400) Subject: allow references to the "internal" dictionaries, too X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9750cfca5990fff67b168539228863dfcd7b6c6b;p=thirdparty%2Ffreeradius-server.git allow references to the "internal" dictionaries, too --- diff --git a/src/lib/util/dict_util.c b/src/lib/util/dict_util.c index df294872fb2..f0df844ffe3 100644 --- a/src/lib/util/dict_util.c +++ b/src/lib/util/dict_util.c @@ -1923,9 +1923,13 @@ ssize_t dict_by_protocol_substr(fr_dict_attr_err_t *err, dict = fr_hash_table_find(dict_gctx->protocol_by_name, &(fr_dict_t){ .root = &root }); if (!dict) { - fr_strerror_printf("Unknown protocol '%s'", root.name); - memcpy(out, &dict_def, sizeof(*out)); - return 0; + if (strcasecmp(root.name, "internal") != 0) { + fr_strerror_printf("Unknown protocol '%s'", root.name); + memcpy(out, &dict_def, sizeof(*out)); + return 0; + } + + dict = dict_gctx->internal; } *out = dict;