#115 Sending radius ipaddr params with aaa_radius

modules (179)


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:
For example if I want to pass 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(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:
the module can check if Login-IP-Host is ipaddr then convert $si to int and only then to send it.


  • Alex Massover

    Alex Massover - 2009-10-26
    • milestone: --> 976383
  • Alex Massover

    Alex Massover - 2009-10-27

    Solution2 - Against 1.6.0

  • Alex Massover

    Alex Massover - 2009-10-27
    • summary: {s.ip} transformation for filling Radius ipaddr params --> Sending radius ipaddr params with aaa_radius
    • labels: --> modules
  • Alex Massover

    Alex Massover - 2009-10-27

    I added a patch implementing solution #2, it will allow directly assigning dotted notation ip variables to ipaddr radius types, like following:

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

  • Bogdan-Andrei Iancu

    • assigned_to: nobody --> ironmissy
  • Irina-Maria Stanescu

    I tested and applied the patch.
    Thanks Alex!

    Irina Stanescu

  • Irina-Maria Stanescu

    • milestone: 976383 --> trunk
    • status: open --> closed-accepted

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks