Server switch

Emmanuel BILLOT emmanuel.billot at ac-orleans-tours.fr
Tue Mar 26 14:52:48 CET 2013


Le 26/03/2013 14:45, Matthew Newton a écrit :
> On Tue, Mar 26, 2013 at 02:20:40PM +0100, Emmanuel BILLOT wrote:
>> How about hyphen SSID ? ex : WIFI-TEST
>> I failed in writing regex for it...
>    if (Calling-Station-Id =~ /^.*:([a-zA-Z-]+)$/) {
>
> Matthew
>
>
Thanks it seems to be ok. Proxy should resent request to virtual server 
so it should work.
But now i have

authorize {
  if (Called-Station-Id =~ /^.*:([-a-zA-Z]+)$/) {
     update control {
       Tmp-String-0 := "%{1}"
     }
   }

   switch "%{Tmp-String-0}" {
     case 'WIFI-ACAD' {
        update control {
           Proxy-To-Realm := "ACAD"
        }
     }
     case 'WIFI-ELEVES' {
        update control {
           Proxy-To-Realm := acad
        }
     }
   }
}


and result is

# Executing section authorize from file /etc/raddb/sites-enabled/default
+- entering group authorize {...}
++? if (Called-Station-Id =~ /^.*:([-a-zA-Z]+)$/)
? Evaluating (Called-Station-Id =~ /^.*:([-a-zA-Z]+)$/) -> TRUE
++? if (Called-Station-Id =~ /^.*:([-a-zA-Z]+)$/) -> TRUE
++- entering if (Called-Station-Id =~ /^.*:([-a-zA-Z]+)$/) {...}
         expand: %{1} -> WIFI-ACAD
+++[control] returns notfound
++- if (Called-Station-Id =~ /^.*:([-a-zA-Z]+)$/) returns notfound
         expand: %{Tmp-String-0} ->
++- entering switch %{Tmp-String-0} {...}
+++- switch %{Tmp-String-0} returns notfound
++- group authorize returns notfound
ERROR: No authenticate method (Auth-Type) found for the request: 
Rejecting the user
Failed to authenticate the user.
Using Post-Auth-Type Reject
# Executing group from file /etc/raddb/sites-enabled/default
+- entering group REJECT {...}



More information about the Freeradius-Users mailing list