reference packet code in unlang?

Stefan Winter stefan.winter at restena.lu
Tue Apr 22 14:29:57 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,

we sometimes get Accounting-On/Off tickets that are not meant for us
(don't ask... bugyy NASes).
I have a filter criterion: the NAS sends in Acct-Session-Id a unique
string. When it's meant for us it has a certain value, wehen not, the
string is different.
I would like to match the packets in unlang in preacct and ACK the
packets while not actually processing them (empty accounting{} section).

Using the following in preacct threw a parser error. Maybe I'm just
blind. I don't see the syntax error:

if (Acct-Status-Type == "Accounting-Off" && !(Acct-Session-Id =~
"restena.*")) update control {
~                       Proxy-To-Realm := testrealm.lu
~               }

(first and second line wrapped)

I'm sort of lost...

Greetings,

Stefan Winter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFIDdpE+jm90f8eFWYRAgUkAJ9ivmuZk+W50wXkEV2PeMeSH/sJVgCfQBSO
6UK49D6t2Fk1UPagntYa10I=
=CSEz
-----END PGP SIGNATURE-----



More information about the Freeradius-Users mailing list