acct_unique with more than one Class attribute

Andrea Gabellini andrea.gabellini at telecomitalia.sm
Thu Mar 23 18:33:14 CET 2017


Hi,

I'm trying to use acct_unique from the default accounting policy with FR
3.0.13:

acct_unique {
    update request {
           &Tmp-String-9 := "${policy.class_value_prefix}"
    }

    if (("%{hex:&Class}" =~ /^%{hex:&Tmp-String-9}/) && \
        ("%{string:&Class}" =~
/^${policy.class_value_prefix}([0-9a-f]{32})/i)) {
        update request {
            &Acct-Unique-Session-Id := "%{md5:%{1},%{Acct-Session-ID}}"
        }
    }

    else {
        update request {
            &Acct-Unique-Session-Id :=
"%{md5:%{User-Name},%{Acct-Session-ID},%{%{NAS-IPv6-Address}:-%{NAS-IP-Address}},%{NAS-Identifier},%{NAS-Port-ID},  
%{NAS-Port}}"
         }
    }
}

Currently I already use the Class attribute to deliver some QoS, and so
this policy doesn't work. Any hint to modify it to manage multi value
Class atttibute?

Thanks,
Andrea

-- 
----------------------------------------------------------------
Hit any user to continue. 

----------------------------------------------------------------

Ing. Andrea Gabellini
Email: andrea.gabellini at telecomitalia.sm
Skype: andreagabellini
Tel: (+378) 0549 886111
Fax: (+378) 0549 886188

Telecom Italia San Marino S.p.A.
Via XXVIII Luglio, 212 - Piano -2
47893 Borgo Maggiore
Republic of San Marino

http://www.telecomitalia.sm



More information about the Freeradius-Users mailing list