help-gnu-radius
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gnu-radius] Re: USR Total Control - attribute not found


From: Michael Samanov
Subject: [Help-gnu-radius] Re: USR Total Control - attribute not found
Date: Wed, 2 Oct 2002 18:56:52 +0400

----- Original Message -----
From: "Andrea Mistrali" <address@hidden>
To: <address@hidden>
Cc: <address@hidden>; <address@hidden>
Sent: Wednesday, October 02, 2002 5:16 PM
Subject: USR Total Control - attribute not found


>
> Hi to all!
>
> I've seen in the archives a thread about GNU Radius not supporting
USR/3Com
> VSA.
>
> It has been said it could be a problem with an old dictionary. It is not a
> dictionary problem, but Total Control Hubs does not follow RFCs sending
VSA.
>
> RFC says that a VSA packet should be made in this way:
>
> 1 byte for Attribute (26)
> 1 byte for Attribute length
> 4 bytes for Vendor Code (V009 for Cisco, V429 for USR/3Com, so on)
> 1 byte for Vendor attribute
> 1 byte for Vendor attribute value length
> N bytes for value
>
> USR/3Com VSA packets are made this other way:
>
> 1 byte for Attribute (26)
> 1 byte for Attribute length
> 4 bytes for Vendor Code (V429)
> 4 bytes for Vendor attribute
> N bytes for value
>
> I tried to hack source code to make GNU Radius work with USR Total Control
and
> here is the patch:
>
> --- gnu-radius-0.96.4-nousr/radiusd/radius.c    Wed Oct  2 14:58:40 2002
> +++ gnu-radius-0.96.4/radiusd/radius.c  Wed Oct  2 14:58:59 2002
> @@ -428,10 +428,21 @@ radrecv (host, udp_port, buffer, length)
>           if ((vendorcode = vendor_pec_to_id (vendorpec)) != 0)
>             {
>               ptr += 4;
> -             attribute = *ptr | (vendorcode << 16);
> -             ptr += 2;
> -             attrlen -= 6;
> -             length -= 6;
> +             if (vendorpec == 429)
> +               {               /* Hack for non-compliant USR VSA */
> +                 memcpy (&attribute, ptr, 4);
> +                 ptr += 4;
> +                 attribute = ntohl (attribute) | (vendorcode << 16);
> +                 attrlen -= 8;
> +                 length -= 8;
> +               }
> +             else
> +               {
> +                 attribute = *ptr | (vendorcode << 16);
> +                 ptr += 2;
> +                 attrlen -= 6;
> +                 length -= 6;
> +               }
>             }
>         }
>
>
> This patch works with the USR dictionary given with GNU radius (dict/usr).
>
> Hope to help
>
> Andrea Mistrali

Andrea! Many big, great, huge, giant thanks!!! Now it works!!!

Thanks again!

These guys from USR/3COM (and Gate'sSoft, of course) probably don't read any
RFC's. What a reason - they think - to study first and to follow then the
common standards? We'll better invent our very own ones instead of it.

Well done, 3COM!

To Sergey Poznyakoff: Sergey, could you, please, incorporate this patch into
the source?

Sincerely yours,
  Michael (mailto:address@hidden)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]