diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2018-10-17 11:02:05 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-12-18 17:22:05 +0100 |
commit | 1c56c3d2530c6bbf7630dacb0506310ceefdc83a (patch) | |
tree | d33c63fcde73408432b9c07f64385d04fb4062ae /package/network/config/gre/files/gre.sh | |
parent | d5dd3b113465de1ba1156a0c34284bb33f7f0460 (diff) | |
download | upstream-1c56c3d2530c6bbf7630dacb0506310ceefdc83a.tar.gz upstream-1c56c3d2530c6bbf7630dacb0506310ceefdc83a.tar.bz2 upstream-1c56c3d2530c6bbf7630dacb0506310ceefdc83a.zip |
gre: make encaplimit support configurable
Make inclusion of the destination option header containing the tunnel
encapsulation limit configurable for IPv6 GRE packets.
Setting the uci parameter encaplimit to ignore; allows to disable the
insertion of the destination option header in the IPv6 GRE packets.
Otherwise the tunnel encapsulation limit value can be set to a value
from 0 till 255 by setting the encaplimit uci parameter accordingly.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(backported from 3d015e971f5e3f0df8e8ab149fda1270c5c72507)
Diffstat (limited to 'package/network/config/gre/files/gre.sh')
-rwxr-xr-x | package/network/config/gre/files/gre.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/package/network/config/gre/files/gre.sh b/package/network/config/gre/files/gre.sh index e604bfb259..ca11e87cfd 100755 --- a/package/network/config/gre/files/gre.sh +++ b/package/network/config/gre/files/gre.sh @@ -39,6 +39,7 @@ gre_generic_setup() { [ -n "$ocsum" ] && json_add_boolean ocsum "$ocsum" [ -n "$iseqno" ] && json_add_boolean iseqno "$iseqno" [ -n "$oseqno" ] && json_add_boolean oseqno "$oseqno" + [ -n "$encaplimit" ] && json_add_string encaplimit "$encaplimit" json_close_object proto_close_tunnel @@ -133,7 +134,7 @@ grev6_setup() { local remoteip6 local ip6addr peer6addr weakif - json_get_vars ip6addr peer6addr tunlink weakif + json_get_vars ip6addr peer6addr tunlink weakif encaplimit [ -z "$peer6addr" ] && { proto_notify_error "$cfg" "MISSING_PEER_ADDRESS" @@ -274,6 +275,7 @@ proto_grev6_init_config() { proto_config_add_string "ip6addr" proto_config_add_string "peer6addr" proto_config_add_string "weakif" + proto_config_add_string "encaplimit" } proto_grev6tap_init_config() { |