[23.05.0-rc3] devstatus command fails when wireless or vlan interface is specified

On rc3 I get:

root@OpenWrt:~# devstatus phy0-ap0
Command failed: Invalid argument

On rc2:

root@OpenWrt:/etc# devstatus phy0-ap0
{
	"external": true,
	"present": true,
	"type": "Network device",
	"up": true,
	"carrier": true,
	"auth_status": false,
	"hw-tc-offload": false,
	"devtype": "wlan",
	"mtu": 1500,
	"mtu6": 1500,
	"macaddr": "94:83:c4:29:f5:a5",
	"txqueuelen": 1000,
	"ipv6": false,
	"ip6segmentrouting": false,
	"promisc": false,
	"rpfilter": 0,
	"acceptlocal": false,
	"igmpversion": 0,
	"mldversion": 0,
	"neigh4reachabletime": 30000,
	"neigh6reachabletime": 30000,
	"neigh4gcstaletime": 60,
	"neigh6gcstaletime": 60,
	"neigh4locktime": 100,
	"dadtransmits": 1,
	"multicast": true,
	"sendredirects": true,
	"drop_v4_unicast_in_l2_multicast": false,
	"drop_v6_unicast_in_l2_multicast": false,
	"drop_gratuitous_arp": false,
	"drop_unsolicited_na": false,
	"arp_accept": false,
	"statistics": {
		"collisions": 0,
		"rx_frame_errors": 0,
		"tx_compressed": 0,
		"multicast": 0,
		"rx_length_errors": 0,
		"tx_dropped": 0,
		"rx_bytes": 3894965,
		"rx_missed_errors": 0,
		"tx_errors": 0,
		"rx_compressed": 0,
		"rx_over_errors": 0,
		"tx_fifo_errors": 0,
		"rx_crc_errors": 0,
		"rx_packets": 30769,
		"tx_heartbeat_errors": 0,
		"rx_dropped": 0,
		"tx_aborted_errors": 0,
		"tx_packets": 34045,
		"rx_errors": 0,
		"tx_bytes": 11327708,
		"tx_window_errors": 0,
		"rx_fifo_errors": 0,
		"tx_carrier_errors": 0
	}
}

I have tried this on gl-inet mt1300 and gl-inet mt300n-v2, both mipsel_24kc and get the same problem.
It does work if br-lan is specified though.

@nbd - any idea?

@jow @nbd
It seems like it fails on vlan interfaces too.
To clarify where it works and where it does not on rc3 (gl-mt1300):

root@OpenWrt:~# ip link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1504 qdisc mq state UP qlen 1000
    link/ether 94:83:c4:20:77:4e brd ff:ff:ff:ff:ff:ff
3: wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 94:83:c4:20:77:4d brd ff:ff:ff:ff:ff:ff
4: lan1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 94:83:c4:20:77:4e brd ff:ff:ff:ff:ff:ff
5: lan2@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether 94:83:c4:20:77:4e brd ff:ff:ff:ff:ff:ff
8: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 94:83:c4:20:77:4e brd ff:ff:ff:ff:ff:ff
11: phy0-ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 96:83:c4:20:77:4f brd ff:ff:ff:ff:ff:ff
12: phy1-ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 96:83:c4:20:77:50 brd ff:ff:ff:ff:ff:ff

It fails with lan1@eth0, lan2@eth0, phy0-ap0, phy1-ap0
but works with every other interface.

I tried to reproduce this with the official rc3 build on a mt7621 device, but everything seemed normal. Could you please show me your config?

1 Like

@nbd @jow
It seems the reason for this was that I inadvertently had a bridge loop on the lan I was testing rc3, but did not when I tried rc2 connected, by chance to an isolated network (I'm working on a fairly large mesh network).

So, fixing the bridge loop also fixes the devstatus issue. Asking for the config made me look very closely at what was configured and where on the lan, not just the config on one device.

Why a bridge loop would break devstatus I do not know - very interesting!
@nbd - thank you very much for your time.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.