Developing lightweight computation at the DSG edge

Commit 53440063 authored by Pau Escrich's avatar Pau Escrich
Browse files

If dhcp metric is not specified, do not include it into network configuration

Change default dhcp metric from 2048 to non-specified since netifd seems to be buggy with dhcp metric
parent 51b512ba
......@@ -119,7 +119,7 @@ config 'qmp' 'networks'
option bmx6_ripe_prefix48 '2012:0:0'
# Metric for WAN interfaces (dhcp client).
option wan_metric '2048'
# option wan_metric '2048'
# -----------------------------
# Wireless general configuration
......@@ -128,3 +128,4 @@ config 'qmp' 'wireless'
option driver 'mac80211'
option country 'SP'
option bssid '02:CA:FF:EE:BA:BE'
......@@ -334,7 +334,7 @@ qmp_configure_wan() {
qmp_attach_device_to_interface $i $viface
qmp_uci_set_raw network.$viface.proto="dhcp"
metric="$(qmp_uci_get network.wan_metric)"
qmp_uci_set_raw network.$viface.metric="${metric:-2048}"
[ -n "$metric" ] && qmp_uci_set_raw network.$viface.metric="$metric"
qmp_gw_masq_wan 1
qmp_set_mss_clamping $i
done
......
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