[OpenSIPS-Devel] 2.4 new IP and Subnet comparison.

Adam Overbeeke Adam.Overbeeke at genesys.com
Tue Aug 7 16:53:08 EDT 2018


Hello,

We are trying to use the new functionality in 2.4:


  *   any script variable now supports comparison via the '==' and '!=' logical operators with IP addresses and netmasks (eg. $var(ip) == 10.10.0.0/24). This tests whether the IP address in the variable matches the subnet given in the expression.

Can you provide a better example for the IP address within a netmask comparison? The example given does not compile with the given cidr and we have no way to know what value was set to the variable. A simple example with variables set for IP and CIDR and the comparison would be appreciated. If you offer another way to determine IP within a subnet, that would work too.

Thanks,

Adam

Adam Overbeeke
Lead Voice Network Engineer, PureCloud
[cid:image001.png at 01D2DB78.7C3D8250]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20180807/d44706e0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 1242 bytes
Desc: image001.png
URL: <http://lists.opensips.org/pipermail/devel/attachments/20180807/d44706e0/attachment.png>


More information about the Devel mailing list