wrong return -> (/ip arp find ... )

hi all
I use this code

/ip arp remove [/ip arp find address=172.16.1.254  and mac-address=AC:7B:A1:B3:D4:77 and dynamic=no ]

in my custom script
but its work in wrong way and removes both (172.16.1.254 & 172.16.1.253) from ARP table
i don’t know why?

I tested this on my router and dont seem to have the same issues when running this command.

/ip arp remove [/ip arp find address="192.168.19.76" and mac-address ="00:00:00:00:00:12" and dynamic=no]

If you just run the command on its own and not in your script, does it do the same thing?

yep

[/ip arp find address=172.16.1.254  and mac-address=AC:7B:A1:B3:D4:77 and dynamic=no ]

this find return 2 number instead of 1

Hmm,

Can you try put the arguments in " quotes and see if that helps?

What ROS are you running?

this is not my problem
here is my On logout script for my hotspot

:local "hotspot_user" $user;
:local "hotspot_address" $address;
/ip firewall nat remove [/ip firewall nat find src-address=$address];
/ip arp remove [/ip arp find address=$address  and mac-address=$"mac-address" and dynamic=no ];
:log info "User $user with ip-address  $address and MAC $"mac-address" Interface $interface logged out!"

on login

/ip  firewall nat add action=masquerade chain=srcnat out-interface-list=Data hotspot=auth comment="NAT" src-address=$address;
:log info "User $user with ip-address  $address and MAC $"mac-address" Interface $interface  logged in!"
ip arp add interface=$interface address=$address mac-address=$"mac-address";

this wouldnt work as you have put the quotes after the $

$“mac-address”;

should be

“$mac-address”;

nop if u read the Doc for scripting
variables which has dash between words should be used like $“mac-address”
u can test it
use this

:log info "User $user with ip-address  $address and MAC $"mac-address" Interface $interface  logged in!"

upup