[package] 6to4: follow RFC 6598 and consider 100.61.0.0/10 a private range (#11323)
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 23 Apr 2012 10:12:00 +0000 (10:12 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 23 Apr 2012 10:12:00 +0000 (10:12 +0000)
SVN-Revision: 31444

package/6to4/Makefile
package/6to4/files.old/6to4.sh
package/6to4/files/6to4.sh

index 45639646cc6325225fe73adaf2b2be61794b4530..fc36d0f1521bf583a23594e79497bcb79fad0210 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2010-2011 OpenWrt.org
+# Copyright (C) 2010-2012 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=6to4
-PKG_VERSION:=7
+PKG_VERSION:=8
 PKG_RELEASE:=1
 
 include $(INCLUDE_DIR)/package.mk
index f7f48e5ba465b2bd6c53cfd819ad4755fa398a83..2329e0bd475751fa9c6a27228c6e7a083bc69049 100755 (executable)
@@ -24,6 +24,10 @@ test_6to4_rfc1918()
        [ $1 -eq  10 ] && return 0
        [ $1 -eq 192 ] && [ $2 -eq 168 ] && return 0
        [ $1 -eq 172 ] && [ $2 -ge  16 ] && [ $2 -le  31 ] && return 0
+
+       # RFC 6598
+       [ $1 -eq 100 ] && [ $2 -ge  64 ] && [ $2 -le 127 ] && return 0
+
        return 1
 }
 
index 682538564835b912f460120b887e3fe685ca336d..5cbdce79ab1e47366bd04301a92a7931c9d3be2f 100755 (executable)
@@ -31,6 +31,10 @@ test_6to4_rfc1918()
        [ $1 -eq  10 ] && return 0
        [ $1 -eq 192 ] && [ $2 -eq 168 ] && return 0
        [ $1 -eq 172 ] && [ $2 -ge  16 ] && [ $2 -le  31 ] && return 0
+
+       # RFC 6598
+       [ $1 -eq 100 ] && [ $2 -ge  64 ] && [ $2 -le 127 ] && return 0
+
        return 1
 }
 
@@ -221,7 +225,7 @@ proto_6to4_teardown() {
 }
 
 proto_6to4_init_config() {
-       no_device=1             
+       no_device=1
        available=1
 
        proto_config_add_string "ipaddr"