O script nao executou aqui, MK 2.9.27! Por que sera? Coloquei a interface correta e configurei somente para dropar. Mas nao executou!
O que pode ser?
Citação:
contribuindo mais... fiz uma alteração...
voce pode definir.. se vai apenas DROPAR o cliente, forçando uma reconexão. em alguns casos.. o cliente volta com ack baixo :)
Código :
# Defina abaixo o valor mínimo de ACK :global ack 30; # Defina abaixo 1 para bloquear e 0 para não bloquear o cliente que estiver acima do valor mínimo :global block 0; # Defina abaixo 1 para dropar e 0 para não dropar o cliente que estiver acima do valor mínimo :global drop 1; # Defina abaixo a Interface :global interf "wlan1"; # ============================================================================= # ATENÇÃO ! SO FAÇA ALTERAÇÕES ABAIXO, SE TIVER CERTEZA DO QUE ESTA FAZENDO # ============================================================================= :global total 0; :global mac ""; :global cliente ""; :log info "Listando Clientes com ACK acima de $ack ms:"; :foreach i in=[/interface wireless registration-table find interface=$interf] do={ :if ([/interface wireless registration-table get $i ack-timeout] > $ack) do={ :log info ("COMENTARIO: " . [/interface wireless registration-table get $i comment] . " - MAC: " . [/interface wireless registration-table get $i mac-address] . " - ACK: " . [/interface wireless registration-table get $i ack-timeout]); :set mac [/interface wireless registration-table get $i mac-address]; :set cliente [/interface wireless access-list find mac-address=$mac]; :if ($block = 1) do={ /interface wireless access-list disable $cliente; }; :if ($drop = 1) do={ /interface wireless registration-table remove $i; }; :set total total+1; }; }; :if ($total = 0) do={ :log info "Parabéns ! Nenhum Cliente com ACK acima de $ack ms encontrado."; };