[OpenSIPS-Devel] [ opensips-Patches-2886450 ] Sending radius ipaddr params with aaa_radius

SourceForge.net noreply at sourceforge.net
Fri Oct 30 12:02:05 CET 2009


Patches item #2886450, was opened at 2009-10-26 15:00
Message generated for change (Settings changed) made by bogdan_iancu
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: modules
Group: 1.6.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alex Massover (cupotka2008)
>Assigned to: Irina-Maria Stanescu (ironmissy)
Summary: Sending radius ipaddr params with aaa_radius

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.

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

Comment By: Alex Massover (cupotka2008)
Date: 2009-10-27 15:00

Message:
I added a patch implementing solution #2, it will allow directly assigning
dotted notation ip variables to ipaddr radius types, like following:
modparam("aaa_radius","sets","set1=(Login-IP-Host=$si)")

The patch is also more clean than the first one, so I remove the first
one.

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

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