[Attrs Regex]

Alan DeKok aland at deployingradius.com
Tue May 12 13:40:35 CEST 2015


On May 11, 2015, at 8:43 PM, Thomas Fagart <tfagart at brozs.net> wrote:
> We were sucessfuly using regexp on keys in attr_filter module with FR 2.1.6 FreeBSD 8.0
> 
> Something like that in attrs file :
> 
> "~\^\(.+\)\\.telco$"
>        Framed-IP-Address =* ANY,

  I don't think that ever worked.  You can't put a regex into the key field for the attr_filter module.  The matching for keys is done via string equality.

> After upgrading to FR 2.2.6 Freebsd 10.0, I've got the feeling that this regular expression on realm attribute does not work anymore. I've also noticed that the same regular expression still work in proxy.conf.

  They're documented as working in proxy.conf.

> After spending some time on the mailing list and the doc, I've got different ideas to solve that :
> 1. The new FR might not have been compile properly with pcre lib (as this was a package) (radiusd -Xv does not tell me wether this is the case or not)
> 2. The way regex work have change and I should fine the proper one
> 3. FR 3.x.x has been rewriten and should work better
> 4. Do not use rlm_attrs_filter and do something else (unlang ?)

5.  The attrs file never did what you think it did.

  I've checked the 2.1.6 source.  The matching for keys is done via string equality.  It has *no* regex capability.

  Alan DeKok.




More information about the Freeradius-Users mailing list