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:
680e846
)
make route metrics default to 0
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 9 Mar 2012 09:58:07 +0000
(10:58 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 9 Mar 2012 09:58:07 +0000
(10:58 +0100)
interface-ip.c
patch
|
blob
|
history
system-linux.c
patch
|
blob
|
history
diff --git
a/interface-ip.c
b/interface-ip.c
index 612fd5fdcb8170b4c4c8c86ab591b56ce313b427..51612fa5b3e3b40a2986ada132ebd348528ae731 100644
(file)
--- a/
interface-ip.c
+++ b/
interface-ip.c
@@
-89,8
+89,6
@@
interface_ip_add_route(struct interface *iface, struct blob_attr *attr, bool v6)
if ((cur = tb[ROUTE_METRIC]) != NULL)
route->metric = blobmsg_get_u32(cur);
- else
- route->metric = -1;
if ((cur = tb[ROUTE_MTU]) != NULL)
route->mtu = blobmsg_get_u32(cur);
diff --git
a/system-linux.c
b/system-linux.c
index 6345b7f22bc80c232a689a5a7547116fba84ccff..4a8c03df4bb5de55dcae9d2412ebeac04457ff7e 100644
(file)
--- a/
system-linux.c
+++ b/
system-linux.c
@@
-888,7
+888,7
@@
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)
+ if (route->metric > 0)
nla_put_u32(msg, RTA_PRIORITY, route->metric);
if (have_gw)