summaryrefslogtreecommitdiffhomepage
path: root/interface-ip.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-19 23:10:54 +0100
committerFelix Fietkau <nbd@openwrt.org>2012-03-19 23:10:54 +0100
commit257bfc6392bf8a1c215f0bd6889db4694a405c1d (patch)
treefcbff13419b976fdb99fa9674b8cc0bfd0421097 /interface-ip.c
parent655ef783b1d5f72af3acccc87455c365fea4ad42 (diff)
add a flag to keep track of route metric overrides
Diffstat (limited to 'interface-ip.c')
-rw-r--r--interface-ip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/interface-ip.c b/interface-ip.c
index 170b03b..56f3c0c 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -86,8 +86,10 @@ interface_ip_add_route(struct interface *iface, struct blob_attr *attr, bool v6)
}
}
- if ((cur = tb[ROUTE_METRIC]) != NULL)
+ if ((cur = tb[ROUTE_METRIC]) != NULL) {
route->metric = blobmsg_get_u32(cur);
+ route->flags |= DEVROUTE_METRIC;
+ }
if ((cur = tb[ROUTE_MTU]) != NULL)
route->mtu = blobmsg_get_u32(cur);