fix a race condition with dynamic interfaces and firewalling
authorFelix Fietkau <nbd@openwrt.org>
Sat, 4 Aug 2007 13:26:41 +0000 (13:26 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 4 Aug 2007 13:26:41 +0000 (13:26 +0000)
SVN-Revision: 8343

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

index fce5472cf2d9f7d547484bf5efcd7648866416df..6bf621437508fe77b02103fe944c455862269cf1 100644 (file)
@@ -1,6 +1,3 @@
 [ ifup = "$ACTION" ] && {
        uci set "/var/state/network.$INTERFACE.up=1"
-       [ -z "$DEVICE" ] || {
-               uci set "/var/state/network.$INTERFACE.ifname=$DEVICE"
-       }
 }
index c384b3e142124238a5b60295c4418fb2aab396d2..3ff65ff8f564b559ae8159638bffced43abd65d4 100755 (executable)
@@ -137,6 +137,7 @@ setup_interface() {
        config_get mtu "$config" mtu
        config_get macaddr "$config" macaddr
        $DEBUG ifconfig "$iface" ${macaddr:+hw ether "$macaddr"} ${mtu:+mtu $mtu} up
+       uci set "/var/state/network.$config.ifname=$iface"
 
        pidfile="/var/run/$iface.pid"
        case "$proto" in