aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2018-05-29 15:18:16 +0200
committerHans Dedecker <dedeckeh@gmail.com>2018-06-04 17:04:45 +0200
commita3372953e99bc2b4da38fdb62c33215ae5623464 (patch)
tree67b2670a3db172c587d9bfef1ce0e0de07f55b92 /package/network
parent4fdc6ca31bda4aad2a65b8460b0caa5c60f87f41 (diff)
downloadupstream-a3372953e99bc2b4da38fdb62c33215ae5623464.tar.gz
upstream-a3372953e99bc2b4da38fdb62c33215ae5623464.tar.bz2
upstream-a3372953e99bc2b4da38fdb62c33215ae5623464.zip
ds-lite: make tunnel encapsulation limit support configurable (FS#1501)
Be compatible with ISPs which don't support the destination option header containing the tunnel encapsulation limit as reported in FS#1501. Setting the uci parameter encaplimit to ignore; allows to disable the insertion of the destination option header in the ds-lite packets. Otherwise the tunnel encapsulation limit value can be set to a value from 0 till 255 by setting the encaplimit uci parameter accordingly. If no encaplimit value is specified the default value is 4 as before. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/ipv6/ds-lite/Makefile2
-rw-r--r--[-rwxr-xr-x]package/network/ipv6/ds-lite/files/dslite.sh8
2 files changed, 7 insertions, 3 deletions
diff --git a/package/network/ipv6/ds-lite/Makefile b/package/network/ipv6/ds-lite/Makefile
index 58e7156b95..4393d35877 100644
--- a/package/network/ipv6/ds-lite/Makefile
+++ b/package/network/ipv6/ds-lite/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ds-lite
PKG_VERSION:=7
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
diff --git a/package/network/ipv6/ds-lite/files/dslite.sh b/package/network/ipv6/ds-lite/files/dslite.sh
index 2485a424dc..7bd3f2e70d 100755..100644
--- a/package/network/ipv6/ds-lite/files/dslite.sh
+++ b/package/network/ipv6/ds-lite/files/dslite.sh
@@ -15,8 +15,8 @@ proto_dslite_setup() {
local link="ds-$cfg"
local remoteip6
- local mtu ttl peeraddr ip6addr tunlink zone weakif
- json_get_vars mtu ttl peeraddr ip6addr tunlink zone weakif
+ local mtu ttl peeraddr ip6addr tunlink zone weakif encaplimit
+ json_get_vars mtu ttl peeraddr ip6addr tunlink zone weakif encaplimit
[ -z "$peeraddr" ] && {
proto_notify_error "$cfg" "MISSING_ADDRESS"
@@ -68,6 +68,9 @@ proto_dslite_setup() {
json_add_string local "$ip6addr"
json_add_string remote "$peeraddr"
[ -n "$tunlink" ] && json_add_string link "$tunlink"
+ json_add_object "data"
+ json_add_string encaplimit "${encaplimit:-4}"
+ json_close_object
proto_close_tunnel
proto_add_data
@@ -97,6 +100,7 @@ proto_dslite_init_config() {
proto_config_add_string "tunlink"
proto_config_add_int "mtu"
proto_config_add_int "ttl"
+ proto_config_add_string "encaplimit"
proto_config_add_string "zone"
proto_config_add_string "weakif"
}