From: Arran Cudbard-Bell Date: Thu, 30 Jun 2011 14:41:05 +0000 (+0200) Subject: Fixup CUI policies to use the new overloading behaviour X-Git-Tag: release_3_0_0_beta0~740 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=d0629fa8ad25399432eb58df299f51bbde205b9c;p=freeradius.git Fixup CUI policies to use the new overloading behaviour --- diff --git a/raddb/policy.conf b/raddb/policy.conf index 18dc683..2f90572 100644 --- a/raddb/policy.conf +++ b/raddb/policy.conf @@ -135,13 +135,17 @@ policy { # # The following policies are for the Chargeable-User-Identity # (CUI) configuration. + + # + # The policies below can be called as just 'cui' (not cui.authorize etc..) + # from the various config sections. # # # The client indicates it can do CUI by sending a CUI attribute # containing one zero byte # - cui_authorize { + cui.authorize { update request { Chargeable-User-Identity:='\\000' } @@ -151,7 +155,7 @@ policy { # Add a CUI attribute based on the User-Name, and a secret key # known only to this server. # - cui_postauth { + cui.postauth { if (FreeRadius-Proxied-To == 127.0.0.1) { if (outer.request:Chargeable-User-Identity) { update outer.reply { @@ -168,19 +172,11 @@ policy { } } - # - # If there is a CUI attribute in the reply, add it to the DB. - # - cui_updatedb { - if (reply:Chargeable-User-Identity) { - cui - } - } # # If we had stored a CUI for the User, add it to the request. # - cui_accounting { + cui.accounting { # # If the CUI isn't in the packet, see if we can find it # in the DB. @@ -201,6 +197,15 @@ policy { } # + # If there is a CUI attribute in the reply, add it to the DB. + # + cui_updatedb { + if (reply:Chargeable-User-Identity) { + cui + } + } + + # # Normalize the MAC Addresses in the Calling/Called-Station-Id # mac-addr-regexp = ([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})