slen = tmpl_from_attr_substr(vpt, name, request_def, list_def, allow_unknown, allow_undefined);
if (slen <= 0) return slen;
if (name[slen] != '\0') {
- fr_strerror_printf("Unexpected text after attribute name");
+ /* This looks wrong, but it produces meaningful errors for unknown attrs with tags */
+ fr_strerror_printf("Unexpected text after %s", fr_int2str(tmpl_names, vpt->type, "<INVALID>"));
return -slen;
}
return slen;
}
if (name[slen] != '\0') {
- fr_strerror_printf("Unexpected text after attribute name");
+ /* This looks wrong, but it produces meaningful errors for unknown attrs with tags */
+ fr_strerror_printf("Unexpected text after %s", fr_int2str(tmpl_names, vpt->type, "<INVALID>"));
TALLOC_FREE(vpt);
return -slen;
}
data true
condition &request:Foo+Bar == 'request:Foo+Bar'
-data ERROR offset 12 Unexpected text after attribute name
+data ERROR offset 12 Unexpected text after unknown attr
condition 'request:Foo+d' == &request:Foo+Bar
-data ERROR offset 31 Unexpected text after attribute name
+data ERROR offset 31 Unexpected text after unknown attr
# Attribute tags are not allowed for unknown attributes
condition &request:FooBar:0 == &request:FooBar
-data ERROR offset 15 Unexpected text after attribute name
+data ERROR offset 15 Unexpected text after unknown attr
condition ¬-a-list:User-Name == ¬-a-list:User-Name
data ERROR offset 1 Invalid list qualifier