How to determine packet-type in proxy-reply
Hi, I am using freeRADIUS verison 2.1.9. I am trying to add some attribute in proxy-reply, I want to do it only if it is Access-Accept packet. I am trying to achieve it using unlang. I have tried following options and none of them have worked if (%{proxy-reply:Packet-Type} == 2) { } if(proxy-reply:Packet-Type == "Access-Accept"){ } if(reply:Packet-Type == "Access-Accept"{ } if(proxy-reply:Packet-Type == "2"){ } Tue Sep 14 06:34:14 2010 : Info: +- entering group post-proxy {...} Tue Sep 14 06:34:14 2010 : Info: ++? if (proxy-reply:Packet-Type == "2") Tue Sep 14 06:34:14 2010 : Info: (Attribute proxy-reply:Packet-Type was not found) I have read there is meta-attribute as Packet-Type but do not know how to access it, please point me to document which explains meta-attribute or suggest me how do I access packet-type -- Chidanand Gangur Pune.
Chidanand Gangur wrote:
I am trying to add some attribute in proxy-reply, I want to do it only if it is Access-Accept packet. I am trying to achieve it using unlang. I have tried following options and none of them have worked
if (%{proxy-reply:Packet-Type} == 2) { }
if(proxy-reply:Packet-Type == "Access-Accept"){ }
if(reply:Packet-Type == "Access-Accept"{ }
if(proxy-reply:Packet-Type == "2"){ }
Tue Sep 14 06:34:14 2010 : Info: +- entering group post-proxy {...} Tue Sep 14 06:34:14 2010 : Info: ++? if (proxy-reply:Packet-Type == "2") Tue Sep 14 06:34:14 2010 : Info: (Attribute proxy-reply:Packet-Type was not found)
I have read there is meta-attribute as Packet-Type but do not know how to access it, please point me to document which explains meta-attribute or suggest me how do I access packet-type
-- Chidanand Gangur Pune.
------------------------------------------------------------------------
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Chidanand Gangur wrote:
Tue Sep 14 06:34:14 2010 : Info: +- entering group post-proxy {...} Tue Sep 14 06:34:14 2010 : Info: ++? if (proxy-reply:Packet-Type == "2") Tue Sep 14 06:34:14 2010 : Info: (Attribute proxy-reply:Packet-Type was not found)
Was there a proxy reply? What does the rest of the debug output say? Alan DeKok.
On Tue, Sep 14, 2010 at 1:35 PM, Alan DeKok <aland@deployingradius.com>wrote:
Chidanand Gangur wrote:
Tue Sep 14 06:34:14 2010 : Info: +- entering group post-proxy {...} Tue Sep 14 06:34:14 2010 : Info: ++? if (proxy-reply:Packet-Type == "2") Tue Sep 14 06:34:14 2010 : Info: (Attribute proxy-reply:Packet-Type was not found)
Was there a proxy reply? What does the rest of the debug output say?
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
I have pasted some portion of log. As mentioned before I have tried with proxy-reply:Packet-Type reply:Packet-Type control:Packet-Type please see the log below Sending Access-Request of id 200 to 192.168.7.63 port 1812 User-Name = "raduser1" NAS-IP-Address = 127.0.0.1 Calling-Station-Id = "00-0D-88-53-32-6C" Framed-MTU = 1400 NAS-Port-Type = Wireless-802.11 Connect-Info = "CONNECT 11Mbps 802.11b" EAP-Message = 0x020b00261900170301001be37e91e21749074d31dc936475ce411059864ec1b6b29faa4f8ae1 State = 0x1eba03e7000001370001c0a8073f000000031be9887000 Message-Authenticator = 0x00000000000000000000000000000000 Proxy-State = 0x3131 Tue Sep 14 09:02:10 2010 : Info: Proxying request 11 to home server 192.168.7.63 port 1812 Sending Access-Request of id 200 to 192.168.7.63 port 1812 User-Name = "raduser1" NAS-IP-Address = 127.0.0.1 Calling-Station-Id = "00-0D-88-53-32-6C" Framed-MTU = 1400 NAS-Port-Type = Wireless-802.11 Connect-Info = "CONNECT 11Mbps 802.11b" EAP-Message = 0x020b00261900170301001be37e91e21749074d31dc936475ce411059864ec1b6b29faa4f8ae1 State = 0x1eba03e7000001370001c0a8073f000000031be9887000 Message-Authenticator = 0x00000000000000000000000000000000 Proxy-State = 0x3131 Tue Sep 14 09:02:10 2010 : Debug: Going to the next request Tue Sep 14 09:02:10 2010 : Debug: Waking up in 0.9 seconds. rad_recv: Access-Accept packet from host 192.168.7.63 port 1812, id=200, length=274 Proxy-State = 0x3131 Framed-Protocol = PPP Service-Type = Framed-User EAP-Message = 0x030c0004 Class = 0x48b60566000001370001c0a8073f01cb53194e942c9400000000000001a3 MS-CHAP-Domain = "\001TESTAD" MS-CHAP2-Success = 0x01533d46393631394243433732433145333537393543313232324143313945423646434537433241354136 MS-MPPE-Send-Key = 0x6deb15cd9ca7582a3031e15d32b690e558a7641b1a7f5a0189fff55afff97ced MS-MPPE-Recv-Key = 0xa2141b9577914f80ba212fe183db8c7baf610bd083bb21bb2098e8ad767c6ebd Message-Authenticator = 0xa2ffbdf2764a5cb5b4eb4cfcf4178aac Tue Sep 14 09:02:10 2010 : Info: +- entering group post-proxy {...} Tue Sep 14 09:02:10 2010 : Info: ++? if (proxy-reply:Packet-Type == "2") Tue Sep 14 09:02:10 2010 : Info: (Attribute proxy-reply:Packet-Type was not found) Tue Sep 14 09:02:10 2010 : Info: [eap] No pre-existing handler found Tue Sep 14 09:02:10 2010 : Info: ++[eap] returns noop Tue Sep 14 09:02:10 2010 : Info: Found Auth-Type = Accept Tue Sep 14 09:02:10 2010 : Info: Auth-Type = Accept, accepting the user Tue Sep 14 09:02:10 2010 : Info: +- entering group post-auth {...} Tue Sep 14 09:02:10 2010 : Info: ++[exec] returns noop Sending Access-Accept of id 11 to 192.168.6.181 port 32771 Framed-Protocol = PPP Service-Type = Framed-User EAP-Message = 0x030c0004 Class = 0x48b60566000001370001c0a8073f01cb53194e942c9400000000000001a3 MS-CHAP-Domain = "\001TESTAD" MS-CHAP2-Success = 0x01533d46393631394243433732433145333537393543313232324143313945423646434537433241354136 MS-MPPE-Send-Key = 0x6deb15cd9ca7582a3031e15d32b690e558a7641b1a7f5a0189fff55afff97ced MS-MPPE-Recv-Key = 0xa2141b9577914f80ba212fe183db8c7baf610bd083bb21bb2098e8ad767c6ebd Message-Authenticator = 0x00000000000000000000000000000000 Tue Sep 14 09:02:10 2010 : Info: Finished request 11. Tue Sep 14 09:02:10 2010 : Debug: Going to the next request -- Chidanand Gangur Pune.
participants (2)
-
Alan DeKok -
Chidanand Gangur