Support for RFC4372 (Chargeable User Identity)

Maja Wolniewicz mgw at umk.pl
Tue Jan 15 13:24:53 CET 2008


Alan DeKok pisze:
> Stefan Winter wrote:
>> (2.1)
>>
>> If a home RADIUS server that supports the CUI attribute receives an
>>    Access-Request packet containing a CUI (set to nul or otherwise), it
>>    MUST include the CUI attribute in the Access-Accept packet.
> 
>   That can be done via policy logic in "unlang".
> 
>   if ("%{Chargeable-User-Identifier}")  {
> 	update reply {
> 		Chargeable-User-Identifier = ....
> 	}
>   }
> 

According to RFC4372  CUI attribute in request can include a single NUL 
character, then your test
if ("%{Chargeable-User-Identifier}")  {
     update reply {
         Chargeable-User-Identifier = ....
     }
}
evaluates to false.
The only way I've found to handle such a situation (nul CUI or CUI!="") 
is to check the total number of attributes of the name 
Chargeable-User-Identifier, when this number is not 0 then the CUI is set:
if ("%{Chargeable-User-Identifier[#]}" > 0)  {
    update reply {
        Chargeable-User-Identifier = ....
    }
}

Maja Gorecka-Wolniewicz

-- 
Maja Gorecka-Wolniewicz          mgw at umk.pl
              http://www.umk.pl/~mgw
              PGP key: http://www.umk.pl/~mgw/pgp_pub_key.asc
Uczelniane Centrum               Information & Communication
Informatyczne                    Technology Centre
Uniwersytet Mikolaja Kopernika   Nicolaus Copernicus University
Coll. Maximum, pl. Rapackiego 1, 87-100 Torun, Poland
tel.: +48 56-611-27-40 fax: +48 56-622-18-50 tel. kom.: +48-693032574
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2916 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20080115/c1d13fce/attachment.bin>


More information about the Freeradius-Users mailing list