[OpenSIPS-Devel] [ opensips-Patches-2886450 ] {s.ip} transformation for filling Radius ipaddr params

SourceForge.net noreply at sourceforge.net
Mon Oct 26 14:01:22 CET 2009


Patches item #2886450, was opened at 2009-10-26 15:00
Message generated for change (Settings changed) made by cupotka2008
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2886450&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
>Group: 1.6.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alex Massover (cupotka2008)
Assigned to: Nobody/Anonymous (nobody)
Summary: {s.ip} transformation for filling Radius ipaddr params

Initial Comment:
Hi!

The problem:
______________________
Currently there's no easy way to send IP addresses via ipaddr radius parameters using aaa_radius module.
For example, Login-IP-Host is defined as ipaddr and it expects integer:
modparam("aaa_radius","sets","set1=(Login-IP-Host=$avp(i:10))")
For example if I want to pass 10.11.12.13 I need to have inside $avp(i:10)==168496141, but the most likely scenario that I have the dotted notation ip inside to opensips script.
Converting dotted notation ip to integer using avpops is too long and slow.

The solution:
_______________________________
The patch intoduces {s.ip} transformation:
$avp(s:ip)=”10.11.12.13”;
$avp(i:10)=$(avp(s:ip){s.ip})   # gives 168496141

Now I can natively send Login-IP-Host.


Another possible solution:
_______________________________
is to automatically and implicitly convert strings to int somewhere inside aaa_radius.c, for example if I do:
modparam("aaa_radius","sets","set1=(Login-IP-Host=$si)")
the module can check if Login-IP-Host is ipaddr then convert $si to int and only then to send it.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2886450&group_id=232389



More information about the Devel mailing list