aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2018-09-24 14:26:53 +0200
committerFlorian Eckert <fe@dev.tdt.de>2018-10-12 08:13:46 +0200
commit3a5c3e03e2b4eb08ce0a0bc2d1b5d7790ebc1705 (patch)
tree79afbeafa43936d23741a7c63d6a78fc3b109f83 /net
parent8c0ed00c397febfdcbb40e901f77a7a15bfc1d9e (diff)
net/mwan3: also add the metric to the default interface routing table
This is now the same route as in the main table. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'net')
-rw-r--r--net/mwan3/files/lib/mwan3/mwan3.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/mwan3/files/lib/mwan3/mwan3.sh b/net/mwan3/files/lib/mwan3/mwan3.sh
index 2b92a1253..d0a47a523 100644
--- a/net/mwan3/files/lib/mwan3/mwan3.sh
+++ b/net/mwan3/files/lib/mwan3/mwan3.sh
@@ -346,7 +346,7 @@ mwan3_delete_iface_iptables()
mwan3_create_iface_route()
{
- local id route_args
+ local id route_args metric
config_get family $1 family ipv4
mwan3_get_iface_id id $1
@@ -366,6 +366,11 @@ mwan3_create_iface_route()
route_args=""
fi
+ network_get_metric metric $1
+ if [ -n "$metric" -a "$metric" != "0" ]; then
+ route_args="$route_args metric $metric"
+ fi
+
$IP4 route flush table $id
$IP4 route add table $id default $route_args dev $2
mwan3_rtmon_ipv4
@@ -384,6 +389,11 @@ mwan3_create_iface_route()
route_args=""
fi
+ network_get_metric metric $1
+ if [ -n "$metric" -a "$metric" != "0" ]; then
+ route_args="$route_args metric $metric"
+ fi
+
$IP6 route flush table $id
$IP6 route add table $id default $route_args dev $2
mwan3_rtmon_ipv6