Skip to content

Commit 9328918

Browse files
committed
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.
1 parent f6d42bd commit 9328918

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/lib/util/pair_legacy.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,17 @@ fr_slen_t fr_pair_list_afrom_substr(fr_pair_parse_t const *root, fr_pair_parse_t
387387
if (internal) {
388388
slen = fr_dict_oid_component(&err, &da, internal, &our_in, &bareword_terminals);
389389
}
390+
391+
} else if (raw && fr_type_is_structural(da->type) && (raw_type != FR_TYPE_OCTETS)) {
392+
/*
393+
* We were asked to do a "raw" thing, but we found a known attribute matching
394+
* that description.
395+
*
396+
* @todo - this is only allowed because we can't distinguish between "raw.1" and
397+
* "raw.User-Name".
398+
*/
399+
raw = false;
400+
raw_type = FR_TYPE_NULL;
390401
}
391402

392403
if (err != FR_DICT_ATTR_OK) {

0 commit comments

Comments
 (0)