[OpenSIPS-Users] Overlapping address ranges permissions module

Binan AL Halabi binanalhalabi at yahoo.com
Sun Aug 26 09:27:02 CEST 2012


Hi Ali,
You have 2 groups in address table : 
192.168.1.5/32 - Group 1192.168.1.0/24 - Group 2for example if you want to check the permission  in your script, then use check the address as:
if (something) then
check_source_address(group1)
else
.......

The function *check_source_address* is exporeted from PERMISSION module.

//Binan
--- On Sat, 8/25/12, Ali Pey <alipey at gmail.com> wrote:

From: Ali Pey <alipey at gmail.com>
Subject: Re: [OpenSIPS-Users] Overlapping address ranges permissions module
To: "OpenSIPS users mailling list" <users at lists.opensips.org>
Date: Saturday, August 25, 2012, 10:24 AM

Hi Binan,
How is this related to overlapping address range?


On Sat, Aug 25, 2012 at 5:43 AM, Binan AL Halabi <binanalhalabi at yahoo.com> wrote:


Indeed, the function check_address() takes the groupid as one of its arguments
In opensips script you can write a condition to use specific group in specific case.


http://www.opensips.org/html/docs/modules/1.6.x/permissions.html#id293674 

//Binan.

		

On Fri, Aug 24, 2012 at 10:43 AM, Ali Pey <alipey at gmail.com> wrote:



The permissions module returns the first match, so depends on which group is first in your database, that will be selected. So basically you need to make sure there is no overlap. 
Regards,Ali Pey





On Fri, Aug 24, 2012 at 10:31 AM, Brett Nemeroff <brett at nemeroff.com> wrote:



Hello All,I was wondering if anyone knew how gracefully overlapping address ranges works in the permissions module (using the address table).
An example of an overlapping address range would be something like:





192.168.1.5/32 - Group 1192.168.1.0/24 - Group 2





-----Inline Attachment Follows-----

_______________________________________________
Users mailing list
Users at lists.opensips.org

http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________


Users mailing list

Users at lists.opensips.org

http://lists.opensips.org/cgi-bin/mailman/listinfo/users





-----Inline Attachment Follows-----

_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120826/addaac86/attachment.htm>


More information about the Users mailing list