Community discussions

MikroTik App
 
cmit
Forum Guru
Forum Guru
Topic Author
Posts: 1547
Joined: Fri May 28, 2004 12:49 pm
Location: Germany

Strange bug (?) in ROS 6.7

Thu Dec 05, 2013 10:53 pm

Trying to get the ip address assigned to ether2 (by DHCP). ether1 has a statically assigned address.

Running the following piece of code:
:put [/ip address get [/ip address find interface="ether2"] address]
will run without errors.

Output on ROS 5.22 (for example) gives the desired result, i.e. the address or an error "no such item" if there is NO address on ether2.

Running the same code snippet on ROS 6.7 does give the correct address if it is assigned to ether2. BUT if there's no address on ether2, it will silently return the address of another interface, like ether1.

Can anyone confirm this? (Tested on an RB/951-2n)
 
biomesh
Long time Member
Long time Member
Posts: 563
Joined: Fri Feb 10, 2012 8:25 pm

Re: Strange bug (?) in ROS 6.7

Thu Dec 05, 2013 11:32 pm

It looks like when the find command returns without data, it is evaluated as 0 so it would print the address on the interface with index 0.

It happens at least on 6.6 and 6.7 - I didn't test on any earlier 6.x versions. It works as expected on 5.25.

Looks like a bug to me.
 
efaden
Forum Guru
Forum Guru
Posts: 1708
Joined: Sat Mar 30, 2013 1:55 am
Location: New York, USA

Re: Strange bug (?) in ROS 6.7

Thu Dec 05, 2013 11:58 pm

I'll confirm this too...

Sent from my SCH-I545 using Tapatalk
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Strange bug (?) in ROS 6.7

Fri Dec 06, 2013 9:53 am

this find issue will be resolved in 6.8 testing builds already has it.
 
cmit
Forum Guru
Forum Guru
Topic Author
Posts: 1547
Joined: Fri May 28, 2004 12:49 pm
Location: Germany

Re: Strange bug (?) in ROS 6.7

Sat Dec 07, 2013 3:29 pm

Thanks guys - I already thought it was me ;-)

Who is online

Users browsing this forum: No registered users and 66 guests