Hello,
I have written a very small script a while ago and it was working properly in v5. Or maybe I didn't try it well enough. But here is the problem :
:local currentip [/interface wireless registration-table get [find where mac-address=$clientmac] value-name=last-ip];
This part of the script should get the last-ip of an entry in the registration table and that works. It does get the ip address.
But it works correctly only if this mac address is present in the registration table.
I think that when 'find where' statement is not fulfilled it should return a blank string, but instead it takes the 'last-ip' of the first result from the table and assigns it to the variable.
Can anyone tell me why is this behaving this way and maybe a way to fix it ?
P.S. I am pretty certain that I did some tests for the case that this mac is not present back in v5, because I am checking for blank string later in the script :
... and [:len $currentip] > 0
Now the board is using latest v6.7 routeros