3.0.1 & 3.0.2 / error in unlang when using attribute 3GPP-IMSI

Chaigneau, Nicolas nicolas.chaigneau at capgemini.com
Mon Mar 24 16:05:21 CET 2014


A somewhat better fix which does not break "<attribute>:<tag>":


In function radius_list_name(...):

	q = strchr(p, ':');
	if (((q && (q[1] >= '0') && (q[1] <= '9'))) ||
	    (!q && isupper((int) *p))) {
		//NCH: this is wrong, we may have "proxy-reply:3GPP-IMSI" for instance...
		//return unknown;
		if ( (q) && (0 != strncmp(q+1, "3GPP", 4)) ) {
			return unknown;
		}
	}


It's still bad, though.
There should be a way to make this generic (same issue with 3com and 3GPP2 dictionaries).




> -----Message d'origine-----
> 
> I've fixed this by modifying main/util.c as follows:
> 
> In function radius_list_name(...):
> 
> 	/*
> 	 *	We couldn't determine the list if:
> 	 *
> 	 * 	A colon delimiter was found, but the next char was a
> 	 *	number, indicating a tag, not a list qualifier.
> 	 *
> 	 *	No colon was found and the first char was upper case
> 	 *	indicating an attribute.
> 	 *
> 	 */
> 	q = strchr(p, ':');
> 	//NCH: this is wrong, we may have "proxy-reply:3GPP-IMSI" for
> instance...
> 	//if (((q && (q[1] >= '0') && (q[1] <= '9'))) ||
> 	//    (!q && isupper((int) *p))) {
> 	if (!q && isupper((int) *p)) {
> 		return unknown;
> 	}
> 
> 
> The comment says "the next char was a number, indicating a tag, not a
> list qualifier".
> I don't know what this means. I there a risk this fix breaks something
> else ?
> 
> 
> 
> 
> > -----Message d'origine-----
> > De : freeradius-devel-
> > bounces+nchaigne=capgemini.fr at lists.freeradius.org
> [mailto:freeradius-
> > devel-bounces+nchaigne=capgemini.fr at lists.freeradius.org] De la part
> de
> > Chaigneau, Nicolas
> > Envoyé : lundi 24 mars 2014 15:33
> > À : FreeRadius developers mailing list
> > Objet : RE: 3.0.1 & 3.0.2 / error in unlang when using attribute
> 3GPP-
> > IMSI
> >
> > Hello again,
> >
> >
> > I migrated to 3.0.2, but the problem is still here :
> >
> >
> > (0)   update control {
> > (0) ERROR: %{proxy-reply:3GPP-IMSI}
> > (0) ERROR:   ^ Unknown attribute
> > (0)   } # update control = fail
> > (0)  } #  post-proxy = fail
> >
> >
> >
> > Could you look into this ?
> >
> > Thanks,
> > Nicolas.
> >
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.



More information about the Freeradius-Devel mailing list