[SR-Users] misc_radius false error

Daniel-Constantin Mierla miconda at gmail.com
Wed May 15 20:52:44 CEST 2013


Hello,

send a separate patch attached as file. Being the same as integer, I 
assume PW_TYPE_IPADDR is only of IPv4. Is an equivalent for IPv6?

Cheers,
Daniel

On 5/15/13 3:41 PM, Victor V. Kustov wrote:
> Hello!
>
> Radius pairs has two similar types: integer and ipaddr.
> generate_avps
> In modules/misc_radius/functions.c, function generate_avps()
> we see that attribute checked for PW_TYPE_INTEGER (integer) type.
> That incorrect: when rad attribute has PW_TYPE_IPADDR (for example
> Framed-IP-Addr) then we raise error, but we must processing ipaddr same
> as integer.
>
> As result misc_radius cant sent queries with PW_TYPE_IPADDR at all:
> error "attribute ## not integer" raised.
>
>
> Need correct this same way:
>
> @@ -142,7 +196,8 @@ static void generate_avps(struct attr *attrs, VALUE_PAIR* received)
>       do {                                                               \
>          if ((_len) != 0) {                                              \
>              if ((_len) == -1) {                                         \
> -               if (_attrs[_attr].t != PW_TYPE_INTEGER) {               \
> +               if (_attrs[_attr].t != PW_TYPE_INTEGER) \
> +                   if (_attrs[_attr].t != PW_TYPE_IPADDR) {           \
>                      LM_ERR("attribute %d is not of type integer\n",     \
>                             _attrs[_attr].v);                            \
>                      goto error;
>                      \
>
> Daniel, what about my previous patch? May be resend with this corrections?
>
>
> --
>   WBR, Victor
>    JID: coyote at bks.tv
>    JID: coyote at bryansktel.ru
>    I use FREE operation system: 3.8.4-calculate GNU/Linux
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, San Francisco, USA - June 24-27, 2013
   * http://asipto.com/u/katu *




More information about the sr-users mailing list