Community discussions

MikroTik App
 
centinela
just joined
Topic Author
Posts: 2
Joined: Fri Dec 03, 2010 3:03 am

suggestion

Thu Dec 30, 2010 6:40 pm

a good addition to mikrotik, should add to the addreses-list # to when necessary through the list with a FOR, possible, and currently trying to cross it with a FOR and looking to FIND, generates errors when trying to A variable with this command.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: suggestion

Mon Jan 03, 2011 6:40 pm

Can you explain your issue in more detail, ideally posting the commands you're running as well as the output you get?
 
centinela
just joined
Topic Author
Posts: 2
Joined: Fri Dec 03, 2010 3:03 am

Re: suggestion

Mon Jan 03, 2011 8:06 pm

Can you explain your issue in more detail, ideally posting the commands you're running as well as the output you get?
this my Script

:local contadorlista [/ip firewall address-list print count-only ];
:for i from=0 to=$contadorlista do={
:local iplista [/ip firewall address-list get number=$i address ];
:if ( [/ip arp find address=$iplista] != "" ) do={
:local macusuario [/ip arp get [/ip arp find address=$iplista] mac-address ];
/ip firewall address-list set [find address=$iplista] comment=$macusuario;
}
}

in the line 3 .. (:local iplista [/ip firewall address-list get number=$i address ];)
trying to get the parameter addreses the "number $ i" can not be obtained in some occasions, check passing and seemingly get to perform with the "number" it generates an error in some cases, not all the time. says that is not the item.

sometimes I fix it by restarting the RB, but since this would not be an optimal solution.
if the problem is generated by my script, I apologize and thank you for your help

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], raphaps and 67 guests