Fixup CUI policies to use the new overloading behaviour
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 30 Jun 2011 14:41:05 +0000 (16:41 +0200)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 30 Jun 2011 15:46:03 +0000 (17:46 +0200)
raddb/policy.conf

index 18dc683..2f90572 100644 (file)
@@ -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})