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:
fb8c311
)
set route metrics using netlink
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 15 Feb 2012 17:31:55 +0000
(18:31 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 15 Feb 2012 17:31:55 +0000
(18:31 +0100)
system-linux.c
patch
|
blob
|
history
diff --git
a/system-linux.c
b/system-linux.c
index aa3aedaaa30b6e3e983e6a5ef550bbec7b9f7c72..7f825faacca0f566e96f68e6be6def51255229f4 100644
(file)
--- a/
system-linux.c
+++ b/
system-linux.c
@@
-891,6
+891,9
@@
static int system_rt(struct device *dev, struct device_route *route, int cmd)
if (route->mask)
nla_put(msg, RTA_DST, alen, &route->addr);
+ if (route->metric >= 0)
+ nla_put_u32(msg, RTA_PRIORITY, route->metric);
+
if (have_gw)
nla_put(msg, RTA_GATEWAY, alen, &route->nexthop);