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 fce5472..6bf6214 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 c384b3e..3ff65ff 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