[Attrs Regex]

Jorge Pereira jpereiran at gmail.com
Tue May 12 13:13:20 CEST 2015


Thomas,

I suggest upgrade to 3.0.8.
Em 11/05/2015 21:44, "Thomas Fagart" <tfagart at brozs.net> escreveu:

> Hello,
>
> 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,
>         Framed-IP-Netmask =* ANY,
>         Framed-MTU =* ANY,
>         Service-Type =* ANY,
>         Framed-Protocol =* ANY,
>         ERX-Virtual-Router-Name := "test",
>         Tunnel-Type:0 =* ANY,
>         Tunnel-Preference:0 =* ANY,
>         Tunnel-Medium-Type:0 =* ANY,
>         Tunnel-Client-Endpoint:0 =* ANY,
>         Tunnel-Server-Endpoint:0 =* ANY,
>         Tunnel-Assignment-Id:0 =* ANY,
>         Tunnel-Client-Auth-Id:0 =* ANY,
>         Tunnel-Server-Auth-Id:0 =* ANY,
>          Class =* ANY
>
> 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.
>
> Tue May 12 02:07:30 2015 : Debug: [suffix] Looking up realm "toto.telco"
> for User-Name = "test at toto.telco"
> Tue May 12 02:07:30 2015 : Debug: [suffix] Found realm "~^(.+)\.telco$"
> Tue May 12 02:07:30 2015 : Debug: [suffix] Adding Realm = "toto.telco"
> Tue May 12 02:07:30 2015 : Debug: [suffix] Proxying request from user test
> to realm ~^(.+)\.telco$
> Tue May 12 02:07:30 2015 : Debug: [suffix] Preparing to proxy
> authentication request to realm "~^(.+)\.telco$"
> ...
> Tue May 12 02:07:30 2015 : Debug: +group post-proxy {
> Tue May 12 02:07:30 2015 : Debug: [attr_filter.post-proxy]  expand:
> %{Realm} -> toto.telco
> Tue May 12 02:07:30 2015 : Debug: ++[attr_filter.post-proxy] = noop
> Tue May 12 02:07:30 2015 : Debug: +} # group post-proxy = noop
>
> 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 ?)
>
> Could you advise ?
>
> Many thanks
>
> Thomas
>
>
>
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list