From: Alan T. DeKok Date: Mon, 3 Mar 2025 01:23:49 +0000 (-0500) Subject: over-ride "raw.Foo = { ... }" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3dc74e20777c1b028566662ada390c0528fed76f;p=thirdparty%2Ffreeradius-server.git over-ride "raw.Foo = { ... }" use the original data type, and not a hard-coded TLV the parser can't tell the difference between "raw.1 = {...}" and "raw.Foo = {...}", so we just fix the data type after the fact. --- diff --git a/src/lib/util/pair_legacy.c b/src/lib/util/pair_legacy.c index 01c6e12e07..01d0a1babb 100644 --- a/src/lib/util/pair_legacy.c +++ b/src/lib/util/pair_legacy.c @@ -387,6 +387,17 @@ redo: if (internal) { slen = fr_dict_oid_component(&err, &da, internal, &our_in, &bareword_terminals); } + + } else if (raw && fr_type_is_structural(da->type) && (raw_type != FR_TYPE_OCTETS)) { + /* + * We were asked to do a "raw" thing, but we found a known attribute matching + * that description. + * + * @todo - this is only allowed because we can't distinguish between "raw.1" and + * "raw.User-Name". + */ + raw = false; + raw_type = FR_TYPE_NULL; } if (err != FR_DICT_ATTR_OK) {