From 0079ac42fcff0e703467c188c37db902ee8cead8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 20 May 2012 00:42:21 +0200 Subject: [PATCH] pass interface route metric to routes when adding them --- interface-ip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/interface-ip.c b/interface-ip.c index 3b545ca..b681b81 100644 --- a/interface-ip.c +++ b/interface-ip.c @@ -337,6 +337,9 @@ interface_update_proto_route(struct vlist_tree *tree, if (node_new) { bool _enabled = enable_route(ip, route_new); + if (!(route_new->flags & DEVROUTE_METRIC)) + route_new->metric = iface->metric; + if (!(route_new->flags & DEVADDR_EXTERNAL) && !keep && _enabled) system_add_route(dev, route_new); -- 2.25.1