projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fd17ab
)
pass interface route metric to routes when adding them
author
Felix Fietkau
<nbd@openwrt.org>
Sat, 19 May 2012 22:42:21 +0000
(
00:42
+0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Sat, 19 May 2012 22:42:21 +0000
(
00:42
+0200)
interface-ip.c
patch
|
blob
|
history
diff --git
a/interface-ip.c
b/interface-ip.c
index 3b545ca1dfec2db4c520b6e3b2323e374140540f..b681b817e3787700bc98d59096bd94c64250e2ee 100644
(file)
--- 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);