ipv6-support: Make ULA addresses secondary * Deprecates ULA prefixes when there are...
authorSteven Barth <cyrus@openwrt.org>
Tue, 11 Dec 2012 16:56:37 +0000 (16:56 +0000)
committerSteven Barth <cyrus@openwrt.org>
Tue, 11 Dec 2012 16:56:37 +0000 (16:56 +0000)
SVN-Revision: 34630

package/network/ipv6/ipv6-support/Makefile
package/network/ipv6/ipv6-support/files/support.sh

index a814b52fb6454b605d188b725d14fe54938bd995..d570e54fc4fc2b3f1182dbf3d7082420a2ae579a 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ipv6-support
-PKG_VERSION:=2012-12-10
+PKG_VERSION:=2012-12-11
 PKG_RELEASE:=1
 
 include $(INCLUDE_DIR)/package.mk
index 8e8458b88840e8a8d7e4022ee7c944ee5f884cbc..f723e6e5a0ba60845a61d268ec3b4c89521f0bb4 100644 (file)
@@ -111,6 +111,7 @@ announce_prefix() {
        local prefix="$1"
        local network="$2"
        local cmd="$3"
+       local type="$4"
 
        local addr=$(echo "$prefix" | cut -d/ -f1)
        local rem=$(echo "$prefix" | cut -d/ -f2)
@@ -140,6 +141,7 @@ announce_prefix() {
                [ -z "$cmd" ] && cmd=newprefix
 
                [ "$prefix_action" == "npt" ] && msg="$msg"', "npt": 1'
+               [ "$type" == "secondary" ] && msg="$msg"', "secondary": 1'
                ubus call 6distributed "$cmd" "$msg}"
        }
 
@@ -381,7 +383,7 @@ enable_ula_prefix() {
        }
 
        # Announce ULA
-       [ -n "$ula_prefix" ] && announce_prefix "$ula_prefix" "$network"
+       [ -n "$ula_prefix" ] && announce_prefix "$ula_prefix" "$network" newprefix secondary
 }