checking Packet-Type in post-proxy
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Wed Oct 8 09:02:34 CEST 2014
On 8 Oct 2014, at 03:18, Pshem Kowalczyk <pshem.k at gmail.com> wrote:
> Hi,
>
> I have a setup with a frontend server that proxies all request to a number of backend servers. Depending on the type of the reply packet it supposed to do something extra (like log it into the database and update some aspects of the reply for Access-Accept)
>
> I've tried this setup:
>
> post-proxy {
>
> if (proxy-reply:Packet-Type == Access-Accept ){
>
> ....
> }
>
> but it doesn't seem to trigger:
>
> (2) if (proxy-reply:Packet-Type == Access-Accept )
> (2) if (proxy-reply:Packet-Type == Access-Accept ) -> FALSE
> (2) } # post-proxy = noop
>
> So I decided to map it to different attribute to see what the value actually is:
>
> post-proxy {
>
> update control {
> Filter-Id := "%{proxy-reply:Packet-Type}"
> }
> if (proxy-reply:Packet-Type == Access-Accept ){
>
> ....
> }
>
> And this seems to capture the content fine:
Yes Packet-Type is a virtual attribute only accessible via xlat.
proxy-reply:Packet-Type != "%{proxy-reply:Packet-Type}"
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20141008/291c671a/attachment.pgp>
More information about the Freeradius-Users
mailing list