I've been battling with this for the past couple of hours, couldn't find any solution on the forum or wiki. When I do the following (lets assume queue1 exist and the target-address is 192.168.1.1/24) :
Code: Select all
:put [:len [/queue simple get queue1 target-addresses ]]
1
I'm trying to write a script that will assign a queue for each IP lease, but I need to check if a queue already exist for the IP. And I need to do this check by comparing the IP's (I use the comment for something else). I'm trying to strip the subnet (ie, the /24 at the end of 192.168.1.1/24) so I'm left with only the IP address.
Any help would be greatly appreciated!