Swapping input and output octets

Arran Cudbard-Bell a.cudbardb at freeradius.org
Wed Jul 13 07:07:22 CEST 2016


> On 13 Jul 2016, at 00:43, Anuruddha Premalal <anuruddhapremalal at gmail.com> wrote:
> 
> Hi All,
> 
> One of the NAS in our network is reporting the accounting the wrong way
> (input and output octets are swapped).
> 
> I'm trying to fix it by adding a logic similar to below at the start of the
> accounting section
> 
> if( request:NAS-IP-Address == "192.168.1.7" && Acct-Status-Type != "Start"){
>    Temp-Attribute = &Acct-Input-Octets
>    update request {
>        Acct-Input-Octets := &Temp-Attribute
>        Acct-Output-Octets := &Acct-Input-Octets
>    }
> }
> 
> I need to use a temporary variable to perform the data swapping.  However I
> couldn't find a documentation of use of temporary variables or any such.
> Is there a better way to achieve this. How can a variable be used to store
> a value for a temporary reason without adding it to the request body.

Tmp-Integer-0

they're in share/freeradius.dictionary.internal

-Arran

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20160713/13ece6f4/attachment.sig>


More information about the Freeradius-Users mailing list