Skip to content
Snippets Groups Projects
Commit 9106cc0a authored by Steven Barth's avatar Steven Barth
Browse files

netifd: Make mtu configurable of dynamic 6rd tunnel interface


Patch allows to configure the mtu of the dynamic 6rd tunnel interface when created by dhcp script.
In some setups it's desirable to have config control over the 6rd tunnel mtu to maximize the traffic throughput

Signed-off-by: default avatarHans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 42871
parent 1db4cb9c
No related branches found
No related tags found
No related merge requests found
...@@ -65,6 +65,7 @@ setup_interface () { ...@@ -65,6 +65,7 @@ setup_interface () {
[ -n "$IFACE6RD_DELEGATE" ] && json_add_boolean delegate "$IFACE6RD_DELEGATE" [ -n "$IFACE6RD_DELEGATE" ] && json_add_boolean delegate "$IFACE6RD_DELEGATE"
[ -n "$ZONE6RD" ] || ZONE6RD=$ZONE [ -n "$ZONE6RD" ] || ZONE6RD=$ZONE
[ -n "$ZONE6RD" ] && json_add_string zone "$ZONE6RD" [ -n "$ZONE6RD" ] && json_add_string zone "$ZONE6RD"
[ -n "$MTU6RD" ] && json_add_string mtu "$MTU6RD"
json_close_object json_close_object
ubus call network add_dynamic "$(json_dump)" ubus call network add_dynamic "$(json_dump)"
......
...@@ -18,14 +18,15 @@ proto_dhcp_init_config() { ...@@ -18,14 +18,15 @@ proto_dhcp_init_config() {
proto_config_add_boolean delegate proto_config_add_boolean delegate
proto_config_add_string zone6rd proto_config_add_string zone6rd
proto_config_add_string zone proto_config_add_string zone
proto_config_add_string mtu6rd
} }
proto_dhcp_setup() { proto_dhcp_setup() {
local config="$1" local config="$1"
local iface="$2" local iface="$2"
local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd
json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd
local opt dhcpopts local opt dhcpopts
for opt in $reqopts; do for opt in $reqopts; do
...@@ -42,6 +43,7 @@ proto_dhcp_setup() { ...@@ -42,6 +43,7 @@ proto_dhcp_setup() {
[ -n "$iface6rd" ] && append dhcpopts "-O 212" [ -n "$iface6rd" ] && append dhcpopts "-O 212"
[ -n "$zone6rd" ] && proto_export "ZONE6RD=$zone6rd" [ -n "$zone6rd" ] && proto_export "ZONE6RD=$zone6rd"
[ -n "$zone" ] && proto_export "ZONE=$zone" [ -n "$zone" ] && proto_export "ZONE=$zone"
[ -n "$mtu6rd" ] && proto_export "MTU6RD=$mtu6rd"
[ "$delegate" = "0" ] && proto_export "IFACE6RD_DELEGATE=0" [ "$delegate" = "0" ] && proto_export "IFACE6RD_DELEGATE=0"
proto_export "INTERFACE=$config" proto_export "INTERFACE=$config"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment