Semantics of !~ operator

Arran Cudbard-Bell a.cudbardb at freeradius.org
Tue Apr 28 09:06:40 CEST 2015


> 
> ssid {
>        if ( Called-Station-Id ) {
>                if ( Called-Station-Id =~ /^[-A-Fa-f0-9]+:(.*)$/ ) {
>                        update {
>                                Local-SSID = "%{1}"
>                        }
>                }
>        }
> }

A similar policy already exists in policy.d Calling-Station-SSID is already defined.

> 
> 3. Then add a call ssid before files in the authorize section of the sites-enabled/default and sites-enabled/inner-tunnel files,
> 
> ...
> authorize {
> ...
> ssid
> files
> ...
> 
> 4. and now I can use the attribute Local-SSID with simple == and != operators in the users file, e.g.
> 
> DEFAULT Local-SSID == "eduroam"
>  Reply-Message += "Welcome to eduroam"
>  Fall-Through = Yes
> 
> 
> Please let me know if someone thinks I did something fundamentally wrong with this kind of set up. As far as I have tested this it works as intended.

No, that looks fine.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20150428/86a2f7c3/attachment.sig>


More information about the Freeradius-Users mailing list