netifd: drop conflicting 'device' interface property
authorIvan Shapovalov <intelfx@intelfx.name>
Sun, 13 May 2018 21:05:43 +0000 (00:05 +0300)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 08:43:57 +0000 (09:43 +0100)
Do not set device runtime property on interfaces in the hotplug handler
and in fixup_interfaces(). This property conflicts with device option
in several proto handlers (mainly QMI and other WWAN/3G protos) and does
not seem to be used anywhere.

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
(backported from 91b5b2e20d531584918c62a6c6cd046f0580f50a)

package/network/config/netifd/Makefile
package/network/config/netifd/files/etc/hotplug.d/iface/00-netstate
package/network/config/netifd/files/lib/network/config.sh

index d77fe9b96e97219f839ef1c0ee82d84fc74140ef..f8ad3a8d998728465d40b62ff7219c84ade675f0 100644 (file)
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netifd
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
index 023025cd1a0b4a61f44ca19264d99e0e948c1a5f..71ccb01915aa55a3cce7f865da970dd91799af75 100644 (file)
@@ -1,7 +1,6 @@
 [ ifup = "$ACTION" ] && {
        uci_toggle_state network "$INTERFACE" up 1
        [ -n "$DEVICE" ] && {
-               uci_toggle_state network "$INTERFACE" device "$(uci -q get network.$INTERFACE.ifname)"
                uci_toggle_state network "$INTERFACE" ifname "$DEVICE"
        }
 }
index 9128971dab04305d25f5c65520471ebf2545c5f6..0ded45edc4e24f8e45ceb83f26c89b55084f1a16 100755 (executable)
@@ -41,15 +41,12 @@ fixup_interface() {
 
        config_get type "$config" type
        config_get ifname "$config" ifname
-       config_get device "$config" device "$ifname"
        [ "bridge" = "$type" ] && ifname="br-$config"
-       config_set "$config" device "$ifname"
        ubus_call "network.interface.$config" status || return 0
        json_get_var l3dev l3_device
        [ -n "$l3dev" ] && ifname="$l3dev"
        json_init
        config_set "$config" ifname "$ifname"
-       config_set "$config" device "$device"
 }
 
 scan_interfaces() {