Developing lightweight computation at the DSG edge

Commit 282e7b2d authored by Simó Albert i Beltran's avatar Simó Albert i Beltran
Browse files

Import "Remove default bandwidth for default gateways". References #244.

Conflicts:
	packages/qmp-system/files/etc/qmp/qmp_gw.sh
parents 1e5d417c 519b6990
......@@ -67,7 +67,6 @@ config 'gateway'
option 'ignore' '1'
option 'type' 'offer'
option 'network' '::/0'
option 'bandwidth' '100000'
config 'gateway'
option 'type' 'search'
......@@ -78,7 +77,7 @@ config 'gateway'
option 'ignore' '1'
option 'type' 'offer'
option 'network' '0.0.0.0/0'
option 'bandwidth' '100000'
# option 'bandwidth' '100000'
config 'gateway'
option 'type' 'search'
......
......@@ -55,13 +55,7 @@ qmp_exists_gateway()
ignore="$2"
else
config_get exists "$config" $1
if [ "$1" = "bandwidth" ]
then
if [ -z "$exists" ]
then
return
fi
elif [ "$exists" != "$2" ]
if [ "$exists" != "$2" ]
then
return
fi
......@@ -95,36 +89,36 @@ qmp_set_gateway()
}
qmp_gw_search_default_ipv4() {
qmp_set_gateway ignore 1 type offer network 0.0.0.0/0 bandwidth 100000
qmp_set_gateway ignore 1 type offer network 0.0.0.0/0
qmp_set_gateway ignore 0 type search network 0.0.0.0/0 maxPrefixLen 0
qmp_gw_masq_wan 0
}
qmp_gw_search_default_ipv6() {
qmp_set_gateway ignore 1 type offer network ::/0 bandwidth 100000
qmp_set_gateway ignore 1 type offer network ::/0
qmp_set_gateway ignore 0 type search network ::/0
}
qmp_gw_offer_default_ipv4() {
qmp_set_gateway ignore 1 type search network 0.0.0.0/0 maxPrefixLen 0
qmp_set_gateway ignore 0 type offer network 0.0.0.0/0 bandwidth 100000
qmp_set_gateway ignore 0 type offer network 0.0.0.0/0
qmp_gw_masq_wan 1
}
qmp_gw_offer_default_ipv6() {
qmp_set_gateway ignore 1 type search network ::/0
qmp_set_gateway ignore 0 type offer network ::/0 bandwidth 100000
qmp_set_gateway ignore 0 type offer network ::/0
}
qmp_gw_disable_default_ipv4() {
qmp_set_gateway ignore 1 type search network 0.0.0.0/0 maxPrefixLen 0
qmp_set_gateway ignore 1 type offer network 0.0.0.0/0 bandwidth 100000
qmp_set_gateway ignore 1 type offer network 0.0.0.0/0
qmp_gw_masq_wan 0
}
qmp_gw_disable_default_ipv6() {
qmp_set_gateway ignore 1 type search network ::/0
qmp_set_gateway ignore 1 type offer network ::/0 bandwidth 100000
qmp_set_gateway ignore 1 type offer network ::/0
}
qmp_gw_default() {
......
......@@ -38,7 +38,6 @@
# # option 'ignore' '0'
# option 'type' 'offer'
# option 'network' '::/0'
# option 'bandwidth' '100000'
#
# config 'gateway'
# option 'ignore' '0'
......@@ -52,7 +51,6 @@
# # option 'ignore' '0'
# option 'type' 'offer'
# option 'network' '0.0.0.0/0'
# option 'bandwidth' '100000'
#
# config 'gateway'
# option 'type' 'search'
......@@ -80,7 +78,6 @@ translate_tunnel()
then
type_ignore="offer"
type_no_ignore="search"
extra_args_ignore="bandwidth 100000"
if [ "$ipv" = 4 ] && [ "$tunnel_network" = "0.0.0.0/0" ]
then
extra_args_no_ignore="maxPrefixLen 0"
......@@ -91,7 +88,6 @@ translate_tunnel()
then
type_ignore="search"
type_no_ignore="offer"
extra_args_no_ignore="bandwidth 100000"
if [ "$ipv" = 4 ] && [ "$tunnel_network" = "0.0.0.0/0" ]
then
extra_args_ignore="maxPrefixLen 0"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment