Support for RFC4372 (Chargeable User Identity)

Maja Wolniewicz mgw at umk.pl
Mon Jan 21 16:20:43 CET 2008


Alan DeKok pisze:
> Maja Wolniewicz wrote:
>> 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.
> 
>   I've fixed this in CVS head (2.0.1-pre), added better type-checking,
> and removed the requirement to always convert everything to strings:
> 
>   if (Chargeable-User-Identifier == "") {
> 	...
> 
>   if (Framed-IP-Address > 127.0.0.1) {
> 	...
> 
>   ~200 lines of code: big administrator happiness. :)
> 
>   Alan DeKok.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
I'm now running freeradius from CVS
FreeRADIUS Version 2.0.1-pre

in post-auth I have:
if ("%{FreeRADIUS-Proxied-To}" == "127.0.0.1") {
if ("%{Chargeable-User-Identity}") {
         update reply { 
Chargeable-User-Identity:="%{reply:Chargeable-User-Identity}@%{Realm}"
         }
}
else {
         update reply {
          Chargeable-User-Identity-="%{reply:Chargeable-User-Identity}"
         }
}
}

and it still doesn't work for me:

when Chargeable-User-Identity in request has a nul value, I'm getting:

++? if ("%{FreeRADIUS-Proxied-To}" == "127.0.0.1")
         expand: %{FreeRADIUS-Proxied-To} -> 127.0.0.1
? Evaluating ("%{FreeRADIUS-Proxied-To}" == "127.0.0.1") -> TRUE
++? if ("%{FreeRADIUS-Proxied-To}" == "127.0.0.1") -> TRUE
++- entering if ("%{FreeRADIUS-Proxied-To}" == "127.0.0.1")
+++? if ("%{Chargeable-User-Identity}")
         expand: %{Chargeable-User-Identity} ->
? Evaluating ("%{Chargeable-User-Identity}") -> FALSE
+++? if ("%{Chargeable-User-Identity}") -> FALSE
+++- entering else else
         expand: %{reply:Chargeable-User-Identity} ->

when Chargeable-User-Identity in request is AAA

++? if ("%{FreeRADIUS-Proxied-To}" == "127.0.0.1") -> TRUE
++- entering if ("%{FreeRADIUS-Proxied-To}" == "127.0.0.1")
+++? if ("%{Chargeable-User-Identity}")
         expand: %{Chargeable-User-Identity} -> AAA
? Evaluating ("%{Chargeable-User-Identity}") -> TRUE
+++? if ("%{Chargeable-User-Identity}") -> TRUE
+++- entering if ("%{Chargeable-User-Identity}")
         expand: %{reply:Chargeable-User-Identity}@%{Realm} -> xx at umk.pl

Maja

-- 
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/20080121/43a4e623/attachment.bin>


More information about the Freeradius-Users mailing list