Using /usr/local/bin/radclient -f radpkt .............. where radpkt contains:

Packet-Type = Access-Request
        User-Name = "t...@test.test.test"
        Airespace-Wlan-Id = 4
        Service-Type = Framed-User
        Framed-MTU = 1300
        NAS-Port-Type = Wireless-802.11
        Tunnel-Type:0 = VLAN
        Tunnel-Medium-Type:0 = IEEE-802
        Tunnel-Private-Group-Id:0 = "13"


I have unlang in authorise section of sites-enabled/default, after pap:

if (request:Tunnel-Private-Group-Id:0 == "13"){
#if (request:Airespace-Wlan-Id == 3){
   update control {
      Proxy-To-Realm := LOCAL
   }
}

In debug mode I see:

rad_recv: Access-Request packet from host 172.17.193.111 port 51171, id=33, 
length=87
        User-Name = "t...@test.test.test"
        Airespace-Wlan-Id = 4
        Service-Type = Framed-User
        Framed-MTU = 1300
        NAS-Port-Type = Wireless-802.11
        Tunnel-Type:0 = VLAN
        Tunnel-Medium-Type:0 = IEEE-802
        Tunnel-Private-Group-Id:0 = "13"
+- entering group authorize {...}
++[preprocess] returns ok
[auth_log]      expand: /usr/local/var/log/radius/radacct/auth-detail-%Y%m%d -> 
/usr/local/var/log/radius/radacct/auth-detail-20100217
[auth_log] /usr/local/var/log/radius/radacct/auth-detail-%Y%m%d expands to 
/usr/local/var/log/radius/radacct/auth-detail-20100217
[auth_log]      expand: %t -> Wed Feb 17 12:23:28 2010
++[auth_log] returns ok
++[chap] returns noop
++[mschap] returns noop
[suffix] Looking up realm "test.test.test" for User-Name = "t...@test.test.test"
[suffix] Found realm "DEFAULT"
[suffix] Adding Realm = "DEFAULT"
[suffix] Proxying request from user test to realm DEFAULT
[suffix] Preparing to proxy authentication request to realm "DEFAULT"
++[suffix] returns updated
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns notfound
++[files] returns noop
++[expiration] returns noop
++[logintime] returns noop
++[pap] returns noop
++? if (request:Tunnel-Private-Group-Id:0 == "13")
? Evaluating (request:Tunnel-Private-Group-Id:0 == "13") -> FALSE
++? if (request:Tunnel-Private-Group-Id:0 == "13") -> FALSE
        expand: %{client:shortname} -> testing
++[request] returns noop


Etc. etc.

Can someone please explain why the comparison 
(request:Tunnel-Private-Group-Id:0 == "13") fails? I've tried single quotes, 
double quotes and no quotes around the 13. If I change == to != in the unlang, 
the comparison returns TRUE . If I use (request:Airespace-Wlan-Id == 4 ) in the 
comparison, it all works as I would expect.

Thanks in advance,

Leighton




________________________________

---
This transmission is confidential and may be legally privileged. If you receive 
it in error, please notify us immediately by e-mail and remove it from your 
system. If the content of this e-mail does not relate to the business of the 
University of Huddersfield, then we do not endorse it and will accept no 
liability.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to