Community discussions

MikroTik App
 
Johannes33
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 58
Joined: Mon Dec 26, 2016 1:26 am

ambiguous value of type

Mon Mar 27, 2017 10:47 pm

Hi when I import a file with code:
/ip firewall address-list
add address=192.168.2.0/24 list="Admin Lan"
/ip firewall filter
add action=drop chain=input connection-state=invalid
add action=drop chain=forward connection-state=invalid
add chain=input src-address-list="Admin Lan"
add chain=input connection-state=established connection-type=""
add action=drop chain=input
add chain=forward connection-state=new src-address-list="Admin Lan"
add chain=forward connection-state=related
add chain=forward connection-state=established connection-type=""
add action=drop chain=forward
I get the error
"ambiguous value of type, more than one possible value matches input"
and I don't understand the error.
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: ambiguous value of type

Tue Mar 28, 2017 12:21 am

This is about the "connection-type" property. An empty string is not a valid value for it. If you don't want to specify it, don't have the property at all.

I agree the error message is misleading, though I can see what's going on under the hood... When you specify an invalid/incomplete value, RouterOS tries to complete it to one of the full values. For example, writing "f" is completed to "ftp". But having an empty string can be completed to multiple values (in this case, to all values), and so you get this error.
 
Johannes33
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 58
Joined: Mon Dec 26, 2016 1:26 am

Re: ambiguous value of type

Wed Mar 29, 2017 9:08 pm

Thanks a lot. That helped.
I just removed the variable and no more assignment problem.
:)
I have a bigger puzzle for you if you are up for it.
Just posted a setting that does not work and I can't for my life understand what is wrong.
except perhaps that it is a little strange that I can use the master port as connection. In the wiki it is said that I it becomes inoperative when designated "master".
to use the port works just fine, I tried to put master on an unoccupied port, but that just resulted in that I could not connect to the internet.
well if you want the code look here
/Johannes
Last edited by Johannes33 on Wed Mar 29, 2017 10:22 pm, edited 1 time in total.