Strange bug (?) in ROS 6.7

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)

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.

I’ll confirm this too…

Sent from my SCH-I545 using Tapatalk

this find issue will be resolved in 6.8 testing builds already has it.

Thanks guys - I already thought it was me :wink: