modemmanager: Fix Permission Denied error
authorOliver Sedlbauer <redacted>
Wed, 16 Aug 2023 15:24:56 +0000 (17:24 +0200)
committerOliver Sedlbauer <redacted>
Fri, 1 Sep 2023 11:46:45 +0000 (13:46 +0200)
commitac806e99212e43358816ccd733a5fdb7013ef234
treeae3fbfb97c0b6703afd87e52b423a0bc7558d3ce
parent4299e892def0812ba904aa8e662e3608f8198610
modemmanager: Fix Permission Denied error

The proto_send_update function is sending a notification to netifd
during the teardown section. However, netifd filters link update
notifications executed during teardown, as indicated here:
https://git.openwrt.org/?p=project/netifd.git;a=blob;f=proto-shell.c#l515
This was leading to a Permission Denied error due to its behavior,
making proto_send_update ineffective during teardown.

To address the issue, the proto_send_update function has been removed
from the teardown section. This prevents the Permission Denied error
while ensuring proper operation during teardown.

Additionally, in the 10-report-down helper script, a check has been
implemented to determine if the interface is already down. This check
is crucial to avoid triggering a Permission Denied error, especially
in cases where netifd is already aware of a controlled ifdown operation.

Signed-off-by: Oliver Sedlbauer <redacted>
net/modemmanager/Makefile
net/modemmanager/files/10-report-down
net/modemmanager/files/modemmanager.proto
git clone https://git.99rst.org/PROJECT