]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Only leaf vps have the data object
authorNick Porter <nick@portercomputing.co.uk>
Wed, 25 Jan 2023 19:19:44 +0000 (19:19 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 26 Jan 2023 08:32:28 +0000 (08:32 +0000)
src/lib/unlang/xlat_builtin.c

index 5875601c42940c572b47f8eb6d9f76856b4e6488..99494c17e5b98e30cb8d2f9da8b878f5d1696542 100644 (file)
@@ -1053,10 +1053,16 @@ void xlat_debug_attr_vp(request_t *request, fr_pair_t *vp, tmpl_t const *vpt)
        if (vendor) RIDEBUG2("vendor     : %i (%s)", vendor->pen, vendor->name);
        RIDEBUG3("type       : %s", fr_type_to_str(vp->vp_type));
 
-       if (fr_box_is_variable_size(&vp->data)) {
-               RIDEBUG3("length     : %zu", vp->vp_length);
+       switch (vp->da->type) {
+       case FR_TYPE_LEAF:
+               if (fr_box_is_variable_size(&vp->data)) {
+                       RIDEBUG3("length     : %zu", vp->vp_length);
+               }
+               RIDEBUG3("tainted    : %pV", fr_box_bool(vp->data.tainted));
+               break;
+       default:
+               break;
        }
-       RIDEBUG3("tainted    : %pV", fr_box_bool(vp->data.tainted));
 
        if (!RDEBUG_ENABLED4) {
                REXDENT();