]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Update tmpl_attr_afrom_attr_substr() to handle tmpls such as &reply.
authorNick Porter <nick@portercomputing.co.uk>
Thu, 19 Jan 2023 18:41:57 +0000 (18:41 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 9 Feb 2023 16:57:30 +0000 (10:57 -0600)
&reply refers to the existence of the list, &reply. refers to the
presence of children in the list.

src/lib/server/tmpl_tokenize.c

index 2d1142c36014ecb1210c96ee4140567711908e58..4ce97f60787484094d439db113490cc6e12a638f 100644 (file)
@@ -1979,7 +1979,8 @@ do_suffix:
                tmpl_attr_insert(vpt, ar);
        }
 
-       if (tmpl_is_attr(vpt) && (tmpl_rules_cast(vpt) == tmpl_attr_tail_da(vpt)->type)) vpt->rules.cast = FR_TYPE_NULL;
+       if (tmpl_is_attr(vpt) && tmpl_attr_tail_is_normal(vpt) &&
+           (tmpl_rules_cast(vpt) == tmpl_attr_tail_da(vpt)->type)) vpt->rules.cast = FR_TYPE_NULL;
 
        fr_sbuff_marker_release(&m_s);
        return 0;