From: Alan T. DeKok Date: Sat, 6 Dec 2025 15:40:30 +0000 (-0500) Subject: VSA type size depends on the VENDOR type size, but only for RADIUS X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c666c9065b0720194b839569f38f579eebd3cf77;p=thirdparty%2Ffreeradius-server.git VSA type size depends on the VENDOR type size, but only for RADIUS the other protocols are a bit better here. --- diff --git a/src/lib/util/dict_validate.c b/src/lib/util/dict_validate.c index d8d2a174a45..fe1b61af601 100644 --- a/src/lib/util/dict_validate.c +++ b/src/lib/util/dict_validate.c @@ -388,12 +388,15 @@ bool dict_attr_flags_valid(fr_dict_attr_t *da) } /* - * Set the length / type_size of vendor - * attributes from the vendor definition. + * Set the length / type_size of vendor attributes from the the dictionary defaults. If + * there's a vendor, set them from the vendor definition. + * + * But we only do this for RADIUS, because the other protocols aren't crazy enough to + * have different type sizes for different vendors. */ - flags->type_size = 1; - flags->length = 1; - if (attr > 0) { + flags->type_size = dict->root->flags.type_size; + flags->length = dict->root->flags.type_size; + if ((attr > 0) && (dict->root->attr == FR_DICT_PROTO_RADIUS)) { fr_dict_vendor_t const *dv; dv = fr_dict_vendor_by_num(dict, attr);