WiMAX style continuation field used by other vendor
Hi I am working with some Telrad equipment and have found that it uses attributes with vendor ID 5323 and which have the continuation field (format=1,1,c) as used in WiMAX attributes. I tried to add a dictionary with this format string but FreeRADIUS refused to start with the error "Only WiMAX VSAs can have continuations". I traced the error to this section of code (dict.c line 2097): if ((*pvalue != VENDORPEC_WIMAX) || (type != 1) || (length != 1)) { fr_strerror_printf("dict_init: %s[%d]: Only WiMAX VSAs can have continuations", fn, line); return -1; } I would like to ask whether it would be OK to allow continuations for other vendors too here (I am happy to submit a patch). Ben
On Apr 26, 2021, at 9:29 AM, Benjamin Thompson <b.thompson@latera.ru> wrote:
I am working with some Telrad equipment and have found that it uses attributes with vendor ID 5323 and which have the continuation field (format=1,1,c) as used in WiMAX attributes.
OMG what a terrible idea. This is one of the worst things I've seen in years.
I tried to add a dictionary with this format string but FreeRADIUS refused to start with the error "Only WiMAX VSAs can have continuations".
Yes. The source is hard-coded to use the WiMAX vendor ID.
I traced the error to this section of code (dict.c line 2097):
if ((*pvalue != VENDORPEC_WIMAX) || (type != 1) || (length != 1)) { fr_strerror_printf("dict_init: %s[%d]: Only WiMAX VSAs can have continuations", fn, line); return -1; }
There's a lot more to it than that. See src/lib/radius.c, and look for WiMAX.
I would like to ask whether it would be OK to allow continuations for other vendors too here (I am happy to submit a patch).
Sure. Do you have dictionary file that you can share? Alan DeKok.
On Mon, 26 Apr 2021 at 18:05, Alan DeKok <aland@deployingradius.com> wrote:
On Apr 26, 2021, at 9:29 AM, Benjamin Thompson <b.thompson@latera.ru> wrote:
I am working with some Telrad equipment and have found that it uses attributes with vendor ID 5323 and which have the continuation field (format=1,1,c) as used in WiMAX attributes.
OMG what a terrible idea. This is one of the worst things I've seen in years.
I tried to add a dictionary with this format string but FreeRADIUS refused to start with the error "Only WiMAX VSAs can have continuations".
Yes. The source is hard-coded to use the WiMAX vendor ID.
I traced the error to this section of code (dict.c line 2097):
if ((*pvalue != VENDORPEC_WIMAX) || (type != 1) || (length != 1)) { fr_strerror_printf("dict_init: %s[%d]: Only WiMAX VSAs can have continuations", fn, line); return -1; }
There's a lot more to it than that. See src/lib/radius.c, and look for WiMAX.
I would like to ask whether it would be OK to allow continuations for other vendors too here (I am happy to submit a patch).
Sure.
Do you have dictionary file that you can share?
Hi Alan This is what I have: VENDOR Telrad 5323 format=1,1,c BEGIN-VENDOR Telrad ATTRIBUTE Telrad-TSDF-Table 1 tlv ATTRIBUTE Telrad-Item-Identity 1.1 byte ATTRIBUTE Telrad-Reference-VPWS-PDN-Name 1.2 octets ATTRIBUTE Telrad-TSDF-Parameters 1.3 tlv ATTRIBUTE Telrad-C-VLAN-ID 1.3.1 integer ATTRIBUTE Telrad-C-VLAN-ID-Retag 1.3.2 integer ATTRIBUTE Telrad-S-VLAN-ID 1.3.3 integer ATTRIBUTE Telrad-Reference-QOS-Profile-Name 1.3.4 string END-VENDOR Telrad
On Mon, 26 Apr 2021 at 19:12, Benjamin Thompson <b.thompson@latera.ru> wrote:
On Mon, 26 Apr 2021 at 18:05, Alan DeKok <aland@deployingradius.com> wrote:
On Apr 26, 2021, at 9:29 AM, Benjamin Thompson <b.thompson@latera.ru> wrote:
I am working with some Telrad equipment and have found that it uses attributes with vendor ID 5323 and which have the continuation field (format=1,1,c) as used in WiMAX attributes.
OMG what a terrible idea. This is one of the worst things I've seen in years.
I tried to add a dictionary with this format string but FreeRADIUS refused to start with the error "Only WiMAX VSAs can have continuations".
Yes. The source is hard-coded to use the WiMAX vendor ID.
I traced the error to this section of code (dict.c line 2097):
if ((*pvalue != VENDORPEC_WIMAX) || (type != 1) || (length != 1)) { fr_strerror_printf("dict_init: %s[%d]: Only WiMAX VSAs can have continuations", fn, line); return -1; }
There's a lot more to it than that. See src/lib/radius.c, and look for WiMAX.
I would like to ask whether it would be OK to allow continuations for other vendors too here (I am happy to submit a patch).
Sure.
Do you have dictionary file that you can share?
Hi Alan
This is what I have:
VENDOR Telrad 5323 format=1,1,c
BEGIN-VENDOR Telrad
ATTRIBUTE Telrad-TSDF-Table 1 tlv ATTRIBUTE Telrad-Item-Identity 1.1 byte ATTRIBUTE Telrad-Reference-VPWS-PDN-Name 1.2 octets ATTRIBUTE Telrad-TSDF-Parameters 1.3 tlv ATTRIBUTE Telrad-C-VLAN-ID 1.3.1 integer ATTRIBUTE Telrad-C-VLAN-ID-Retag 1.3.2 integer ATTRIBUTE Telrad-S-VLAN-ID 1.3.3 integer ATTRIBUTE Telrad-Reference-QOS-Profile-Name 1.3.4 string
END-VENDOR Telrad
There's a lot more to it than that. See src/lib/radius.c, and look for WiMAX.
If I understood the code correctly, the "flags.wimax = dv->flags;" line 1067 of dict.c should cause the attribute to be encoded as a WiMax attribute in radius.c at line 1498: if (vp->da->flags.wimax) { return rad_vp2wimax(packet, original, secret, pvp, ptr, room); }
On Apr 26, 2021, at 2:46 PM, Benjamin Thompson <b.thompson@latera.ru> wrote:
If I understood the code correctly, the "flags.wimax = dv->flags;" line 1067 of dict.c should cause the attribute to be encoded as a WiMax attribute in radius.c at line 1498:
if (vp->da->flags.wimax) { return rad_vp2wimax(packet, original, secret, pvp, ptr, room); }
See also /* * WiMAX craziness */ if ((vendor == VENDORPEC_WIMAX) && dv->flags) { rcode = data2vp_wimax(ctx, packet, original, secret, vendor, data, attrlen, packetlen, pvp); return rcode; } And it would be _very_ good to add tests in src/test/unit/wimax.txt And it turns out that this came up before. See src/lib/dict.c: /* * <sigh> Alvarion, being *again* a horribly * broken vendor, has re-used the WiMAX format in * their proprietary vendor space. This re-use * means that there are *multiple* conflicting * Alvarion dictionaries. */ "git annotate" says I added that comment in 2011. So It's perhaps understandable that I've completely forgotten that particular kind of breakage. I've pushed the dictionary, some code fixes, and some tests. Alan DeKok.
On Mon, 26 Apr 2021 at 22:50, Alan DeKok <aland@deployingradius.com> wrote:
On Apr 26, 2021, at 2:46 PM, Benjamin Thompson <b.thompson@latera.ru> wrote:
If I understood the code correctly, the "flags.wimax = dv->flags;" line 1067 of dict.c should cause the attribute to be encoded as a WiMax attribute in radius.c at line 1498:
if (vp->da->flags.wimax) { return rad_vp2wimax(packet, original, secret, pvp, ptr, room); }
See also
/* * WiMAX craziness */ if ((vendor == VENDORPEC_WIMAX) && dv->flags) { rcode = data2vp_wimax(ctx, packet, original, secret, vendor, data, attrlen, packetlen, pvp); return rcode; }
And it would be _very_ good to add tests in src/test/unit/wimax.txt
And it turns out that this came up before. See src/lib/dict.c:
/* * <sigh> Alvarion, being *again* a horribly * broken vendor, has re-used the WiMAX format in * their proprietary vendor space. This re-use * means that there are *multiple* conflicting * Alvarion dictionaries. */
"git annotate" says I added that comment in 2011. So It's perhaps understandable that I've completely forgotten that particular kind of breakage.
I've pushed the dictionary, some code fixes, and some tests.
Many thanks Alan
participants (2)
-
Alan DeKok -
Benjamin Thompson