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>
PKG_NAME:=gre
PKG_VERSION:=1
PKG_NAME:=gre
PKG_VERSION:=1
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
[ -n "$ocsum" ] && json_add_boolean ocsum "$ocsum"
[ -n "$iseqno" ] && json_add_boolean iseqno "$iseqno"
[ -n "$oseqno" ] && json_add_boolean oseqno "$oseqno"
[ -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
json_close_object
proto_close_tunnel
local remoteip6
local ip6addr peer6addr weakif
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"
[ -z "$peer6addr" ] && {
proto_notify_error "$cfg" "MISSING_PEER_ADDRESS"
proto_config_add_string "ip6addr"
proto_config_add_string "peer6addr"
proto_config_add_string "weakif"
proto_config_add_string "ip6addr"
proto_config_add_string "peer6addr"
proto_config_add_string "weakif"
+ proto_config_add_string "encaplimit"
}
proto_grev6tap_init_config() {
}
proto_grev6tap_init_config() {