6relayd: try to workaround race condition at startup
authorSteven Barth <cyrus@openwrt.org>
Thu, 2 Jan 2014 11:38:36 +0000 (11:38 +0000)
committerSteven Barth <cyrus@openwrt.org>
Thu, 2 Jan 2014 11:38:36 +0000 (11:38 +0000)
SVN-Revision: 39184

package/network/ipv6/6relayd/Makefile
package/network/ipv6/6relayd/files/6relayd.init

index 6f3c1731736f8a496369eb2f8f24e384a507720f..f3811a9530d0529585846b88eacffe69b18c5d15 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=6relayd
-PKG_VERSION:=2013-10-21
+PKG_VERSION:=2013-10-21.1
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
index 89b8610b4969058b9e118853a7aac249334cc236..68816b765f52264f90259d9cfd7ca8170d4e28e5 100644 (file)
@@ -34,7 +34,7 @@ start_6relayd() {
        local master masterif
        config_get masterif "$cfg" master
        network_get_device master "$masterif"
-       [ -z "$master" ] && master="."
+       [ -z "$master" -o "$master" = "$masterif" ] && master="."
 
        # Detect slave interfaces
        local slaves=""
@@ -45,10 +45,10 @@ start_6relayd() {
                network_get_device slave "$slaveif"
                # Compatibility with old config format
                if [ "$mode" = "relay" -a "$master" = "." ]; then
-                       [ -z "$slave" ] && return 0
+                       [ -z "$slave" -o "$slave" = "$slaveif" ] && return 0
                        master="$slave"
                else
-                       [ -n "$slave" ] && append slaves "$slave"
+                       [ -n "$slave" -o "$slave" = "$slaveif" ] && append slaves "$slave"
                fi
        done