Feature request: logical operator "in" for IP ranges

put (192.168.0.1 in 192.168.0.0/24)

Output:
true

put (192.168.0.1 in 192.168.0.1-192.168.0.254)

Output:
false

Why?

This feature can be useful if you need to check if a conditional IP address is included in an IP pool consisting of several address ranges.

Let’s have a looks:

[admin@mikrotik] > :put (192.168.0.1-192.168.0.254)
4294967043

The addresses are subtracted, so your original command evaluated to:

[admin@mikrotik] > :put (192.168.0.1 in 4294967043) 
false

Wondering if bitwise operators could help…