Why does it say 'Permission denied' when trying to bring down IPV6,(ubus call network.interface notify_proto)?

When WAN goes offline, WAN_6 also goes offline. However, the log shows

ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wan_6" } (Permission denied)

When WAN goes offline, I check if WAN_6 is also offline using this code, but I found that network.interface.wan_6 always exists.

if ubus -S list "network.interface.wan_6";

system logs

Tue Jul 11 09:58:27 2023 daemon.info pppd[4847]: No response to 5 echo-requests
Tue Jul 11 09:58:27 2023 daemon.notice pppd[4847]: Serial link appears to be disconnected.
Tue Jul 11 09:58:27 2023 daemon.info pppd[4847]: Connect time 314.5 minutes.
Tue Jul 11 09:58:27 2023 daemon.info pppd[4847]: Sent 65852309 bytes, received 2085311079 bytes.
Tue Jul 11 09:58:27 2023 daemon.notice netifd: Network device 'pppoe-wan' link is down
Tue Jul 11 09:58:27 2023 daemon.notice netifd: Network alias 'pppoe-wan' link is down
Tue Jul 11 09:58:27 2023 daemon.notice netifd: Interface 'wan_6' has link connectivity loss
Tue Jul 11 09:58:27 2023 daemon.err odhcp6c[5144]: Failed to send RELEASE message to ff02::1:2 (Network unreachable)
Tue Jul 11 09:58:27 2023 daemon.notice netifd: Interface 'wan' has lost the connection
Tue Jul 11 09:58:27 2023 daemon.notice netifd: Interface 'wan_6' is disabled
Tue Jul 11 09:58:27 2023 daemon.notice netifd: wan_6 (5144): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wan_6" } (Permission denied)
Tue Jul 11 09:58:27 2023 user.notice root: wan_6 check down start
Tue Jul 11 09:58:27 2023 user.notice root: waiting wan_6 down... count=10
Tue Jul 11 09:58:27 2023 daemon.err odhcp6c[5144]: Failed to send SOLICIT message to ff02::1:2 (Network unreachable)
Tue Jul 11 09:58:27 2023 daemon.notice netifd: Interface 'wan_6' is now down
Tue Jul 11 09:58:28 2023 user.notice root: waiting wan_6 down... count=9
Tue Jul 11 09:58:29 2023 user.notice root: waiting wan_6 down... count=8

hi @fengymi,

did you find a solution?

no。
Realize your own effect through other methods

Could it be a race condition? Or just an "unhandled exception"?

If I read the log correctly, the wan interface goes down. Then odhcp6c wants to send RELEASE which does not work, be cause the link (aka the wan interface) is already down. Because of that the interfaces gets "disabled".
I'm not quiet sure what the ubus-call is doing, but I assume, ubus wants to bring the interface down, too, but as the interface is already down, or maybe even no longer exists, it gets "permission denied"?!

@jow Pardon me to poke you from the side, but could you comment on "what is ubus trying to do here" (ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wan_6" }) and why it fails? Thank you.