Automatic Bind Rules - AddrInSubnet

Started by scuq, March 31, 2014, 02:05:45 AM

Previous topic - Next topic

scuq

if (AddrInSubnet($node->ipAddr, "10.16.0.0", "255.255.0.0")) {
return;
}


is this valid syntax?

Borgso

Just tried this command and it worked.

http://wiki.netxms.org/wiki/NXSL:AddrInSubnet

if (AddrInSubnet($node->ipAddr, "10.0.0.0", "255.255.255.0")) {
  return true;
}

Victor Kirhenshtein

Quote from: scuq on March 31, 2014, 02:05:45 AM
if (AddrInSubnet($node->ipAddr, "10.16.0.0", "255.255.0.0")) {
return;
}


is this valid syntax?

Syntax is valid, but depending on context (for example if you are writing a filter script) you may need to return TRUE or FALSE instead of null value.

Best regards,
Victor