Lets create a dynamic address list entry first:
/ip firewall address-list add list=test_list comment=test_comment dynamic=yes address=10.0.0.0/8
Now, any one has any idea why do i get false response when i issue:
:put (10.0.0.1 in [/ip firewall address-list get [find comment=test_comment] address])
when at the very time, issuing
:put (10.0.0.1 in 10.0.0.0/8)
would give me true ?
Also, using :toip , did not make any difference
unless i’m missing something, this seems like a bug to me
Edit: Upon further investigation, i believe the problem is that “/ip firewall address-list get ..” , gives back a string data type while the ‘in’ operator, requires either ip or ip-prefix data type. we have :toip command to convert a string to ip. but it does not work for an ip string with prefix. so the question changes to: How to convert a string to ip-prefix data type?
Update: Just contacted MikroTik and they confirmed that this is an issue and said they’ll find a way to solve it.