Community discussions

MikroTik App
 
mstead
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Sat Mar 04, 2006 2:41 am

Script To Add Hotspot IP Binding

Thu Oct 01, 2009 2:24 am

Hi,

I cannot get the following single line to work in a script:

/ip hotspot ip-binding add address=192.168.100.24 place-before=0

I already have an ip binding that is a pass-all rule in case anyone is curious about the place-before command. I am running v3.30.

If I run this from the command line it works. If I remove the place-before it works. If I run the script directly from the command line it works. It worked correctly on v3.23.

HELP!!

Thanks

Malcolm
 
mstead
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Sat Mar 04, 2006 2:41 am

Re: Script To Add Hotspot IP Binding

Thu Oct 01, 2009 5:02 am

ok.

This seems to be yet another stupid Mikrotik coding mistake. If I change my command to:

/ip hotspot ip-binding add address=192.168.100.24 place-before=1

then it works in a script. It will fail in the terminal, which at least means I can work around the problem. But frankly just goes to show the lack of coding change control which seems to be commonplace :-(

Malcolm
 
mstead
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Sat Mar 04, 2006 2:41 am

Re: Script To Add Hotspot IP Binding

Sat Oct 03, 2009 5:31 am

For anyone else with this problem - here is the reply from MT support:

>Hello,

>Try to put following line at the beginning of the script
>/ip hotspot ip-binding print
>This will save into buffer item numbers ad script will be able to use
>place-before=0

>Regards,
>Maris

It still is a pain in the ass that an upgrade from 3.23->3.30 breaks a previously fully working script.

Malcolm

Who is online

Users browsing this forum: No registered users and 16 guests