Netifd will crash if an attempt is made to remove a device that is
not known to netifd. For instance:
ubus call network.interface.lan remove_device "{ \"name\": \"xxx\" }"
Signed-off-by: Nathan Hintz <[email protected]>
--- /dev/null
+++ package/network/config/netifd/patches/002-fix_remove_of_unknown_device.patch
@@ -0,0 +1,11 @@
+--- a/ubus.c
++++ b/ubus.c
+@@ -592,7 +592,7 @@
+ device_lock();
+
+ dev = device_get(blobmsg_data(tb[DEV_NAME]), add ? 2 : 0);
+- if (add && !dev) {
++ if (!dev) {
+ ret = UBUS_STATUS_NOT_FOUND;
+ goto out;
+ }
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel