regular expression problem on 2.1.3

Alexandre Chapellon alexandre.chapellon at mana.pf
Sat Jan 24 04:50:22 CET 2009


I don't think unlang is used for processing users file (an thus neither
mysql as it's supposed to mirror user file)
but you could add an update clause (which uses unlang) to add your reply
items.
something like:
if (request:NAS-IP-Address =~ /192.168.1.1|10.0.1.1/) {
            update reply {
                        Service-Type := Framed-User
                        Framed-Protocol := PPP
                        Fall-Through := Yes
            }
}

But i don't know how clever it is as DEFAULT entry in users file are
supposed to do the job, but behaviour related to nas-ip-address is even
more a matter of huntgroups.

Le 23.01.2009 14:45, Tim Lightfoot a écrit :
> Thank you, I tried it as /expr/  and also "/expr/" both have the same result.
>
> I use these regular expressions within both users file and MySQL on my live Radius box, its failing within both modules.
> Would it be unlang processing the expressions here.
>
> ________________________________
>
> From: freeradius-users-bounces+tim.lightfoot=sota.co.uk at lists.freeradius.org [mailto:freeradius-users-bounces+tim.lightfoot=sota.co.uk at lists.freeradius.org] On Behalf Of Alexandre Chapellon
> Sent: 24 January 2009 00:30
> To: FreeRadius users mailing list
> Subject: Re: regular expression problem on 2.1.3
>
>
> when i use regex, i use it with unlang so it might differ from a users file but here is how i would write it for unlang:
>
>
> DEFAULT NAS-IP-Address =~ /192.168.1.1|10.0.1.1/
>
>
>
>
>
> Le 23.01.2009 14:18, Tim Lightfoot a écrit : 
>
> 	Thanks for the suggestion - this also gives the same result:
> 	
> 	[files] Invalid regular expression : empty (sub)expression 
> 	
> 	Tim
> 	
> 	-----Original Message-----
> 	From:
> 	freeradius-users-bounces+tim.lightfoot=sota.co.uk at lists.freeradius.org
> 	[mailto:freeradius-users-bounces+tim.lightfoot=sota.co.uk at lists.freeradi
> 	us.org] On Behalf Of A.L.M.Buxey at lboro.ac.uk
> 	Sent: 24 January 2009 00:07
> 	To: FreeRadius users mailing list
> 	Subject: Re: regular expression problem on 2.1.3
> 	
> 	Hi,
> 	  
>
> 		Hi,
> 		
> 		I have updated my Freeradius from 2.0.5 to 2.1.3 and am having a 
> 		problem with the regular expressions I am using in the users file.
> 		
> 		If I provide a simple example users file I am testing against:
> 		
> 		DEFAULT	NAS-IP-Address =~ "192.168.1.1|10.0.1.1"
> 		    
>
> 	
> 	"(192.168.1.1|10.0.1.1)" ?
> 	
> 	alan
> 	-
> 	List info/subscribe/unsubscribe? See
> 	http://www.freeradius.org/list/users.html
> 	
> 	
> 	-
> 	List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
> 	
> 	  
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
>   



More information about the Freeradius-Users mailing list