To conclude this discussion, I just pushed a commit to master branch
that masks also the value of the subnet address parameter. There was
also a github enhancement request in the tracker related to the same topic.
Cheers,
Daniel
On 14.03.18 16:56, Daniel-Constantin Mierla wrote:
>
> Hi Hugh,
>
Hello Daniel,
Thank you the following worked.
Slava.
On Wed, Mar 14, 2018 at 1:02 PM, Daniel-Constantin Mierla
wrote:
Based on what Hugh found, you need to use subnet masked address, so
try
like:
if(!is_in_subnet("$si",
"$(dd{s.select,0,.}).$(dd{s.select,1,.}).0.0/16"))
Based on what Hugh found, you need to use subnet masked address, so try
like:
if(!is_in_subnet("$si", "$(dd{s.select,0,.}).$(dd{s.select,1,.}).0.0/16")) {
Cheers,
Daniel
On 14.03.18 15:28, volga...@networklab.ca wrote:
> I tried /30, /32, /24 none of them works.
>
> Slava.
>
> On Wed, Mar 14,
If you set debug=3 and these are all log messages you got, then the
debug level is diverted to another file by your syslog configuration.
You should see a lot of log messages with "DEBUG" inside them.
Cheers,
Daniel
On 14.03.18 14:21, volga...@networklab.ca wrote:
> in debug in level 3 or 4 not
Hi,
It looks from the code that the subnet IP address must be masked.
https://github.com/kamailio/kamailio/blob/master/src/modules/ipops/ipops_mod.c#L393
if ((ip->s_addr & ipv4_mask) == net_addr.s_addr)
return 1;
return 0;
So 10.1.1.0/24 will match 10.1.1.241
but 10.1.1.128/24 will NOT match
I tried /30, /32, /24 none of them works.
Slava.
On Wed, Mar 14, 2018 at 9:39 AM, Daniel-Constantin Mierla
wrote:
Hello,
maybe it is what Hugh said in his response, respectively that the
subnet
needs to have the lowest bits masked.
Can you run with debug=3? Maybe ipops
in debug in level 3 or 4 not providing any useful messages.
Mar 14 14:10:20 prx00 kamailio[1414]: {2 2 INVITE
143678_rel51ZGUyMTI5YWE0Y2Q3OWIzYWQ4NmMyYmM2ZWI0M2IyYmE} 5(1421) exec:
*** cfgtrace:failure_route=[NATMANAGE] c=[/etc/kamailio/kamailio.cfg]
l=807 a=26 n=is_in_subnet
Mar 14 14:10:20
Hello,
maybe it is what Hugh said in his response, respectively that the subnet
needs to have the lowest bits masked.
Can you run with debug=3? Maybe ipops module writes more debug message
to track it.
Cheers,
Daniel
On 14.03.18 13:33, volga...@networklab.ca wrote:
> Hello Daniel,
> I
Hello,
On 14.03.18 00:19, volga...@networklab.ca wrote:
> Hello Everyone,
> Not sure what I am missing, but can't match ip address to subnet
>
> Log says
>
> INFO:
Hi,
The log message doesn't quite match your code sample. The code puts the
subnet into the log, but your output does not have the /16 (in red below).
Could you repeat and print all the avp's before and after is-in-subnet()?
I can't remember if the subnet needs to have the lowest bits masked, but
Hello Everyone,
Not sure what I am missing, but can't match ip address to subnet
Log says
INFO:
11 matches
Mail list logo