Community discussions

MikroTik App
 
Wachler
just joined
Topic Author
Posts: 4
Joined: Sat Jan 23, 2010 2:23 pm

simple skcipt with "in", help please

Sat Jan 23, 2010 2:56 pm

Hellou,
i have very simple script:
return true/false if IP adress from registration-table is member any of range from array
:local Ranges [:toarray "192.168.1.0/24,192.168.2.0/24"]; \
:foreach i in=[/interface wireless registration-table find] do={ \
  :local lastIP [/interface wireless registration-table get $i last-ip]; \
  :foreach j in=$Ranges do={ \    
    :log info ( $lastIP ." is in range ". $j ." ?"); \
    :log info ( $lastIP in $j); \
  }; \
};
I tryed
1) lastIp with "/32"
2) convert function :toip

and nothing, any ideas?

PS: sorry for my english

Who is online

Users browsing this forum: Bing [Bot] and 6 guests