[Serusers] Re: RADIUS failure for long domains returned by ENUM queries

Andrei Pelinescu-Onciul andrei at iptel.org
Tue Jun 7 20:47:08 CEST 2005


On Jun 07, 2005 at 20:38, Adrian Georgescu <ag at ag-projects.com> wrote:
> Juha, what if the response from DNS is greater then 253 bytes?

A quick fix not to overload the radiusclient library would be to check
the uri size from the script, after doing the enum lookup:

if (uri=~"^sip:.{250,}"){
    log("error, uri too long\n");
    sl_send_reply(....);
    break;
}

This is not be the most performance friendly approach (reg. expr uri
checks), but should work.


Andrei


> 
> Juha Heinanen wrote:
> 
> >adrian,
> >
> >the value of the attribute that you try to add is 202 bytes long.
> >my /usr/include/radiusclient.h defines
> >
> >#define AUTH_STRING_LEN		128	 /* maximum of 253 */
> >
> >typedef struct value_pair
> >{
> >	char               name[NAME_LENGTH + 1];
> >	int                attribute;
> >	int                type;
> >	UINT4              lvalue;
> >	char               strvalue[AUTH_STRING_LEN + 1];
> >	struct value_pair *next;
> >} VALUE_PAIR;
> >
> >thus the value is too long and would fail.
> >
> >on the other hand, my /usr/include/radiusclient-ng defines:
> >
> >#define AUTH_STRING_LEN		253	 /* maximum of 253 */
> >
> >which one are you using in your test setup?
> >
> >-- juha
> > 
> >




More information about the sr-users mailing list