projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
655ef78
)
add a flag to keep track of route metric overrides
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 19 Mar 2012 22:10:54 +0000
(23:10 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 19 Mar 2012 22:10:54 +0000
(23:10 +0100)
interface-ip.c
patch
|
blob
|
history
interface-ip.h
patch
|
blob
|
history
diff --git
a/interface-ip.c
b/interface-ip.c
index
170b03b
..
56f3c0c
100644
(file)
--- 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);
diff --git
a/interface-ip.h
b/interface-ip.h
index
0ce94df
..
68bfdf6
100644
(file)
--- a/
interface-ip.h
+++ b/
interface-ip.h
@@
-11,6
+11,9
@@
enum device_addr_flags {
/* externally added address */
DEVADDR_EXTERNAL = (1 << 2),
+
+ /* route overrides the default interface metric */
+ DEVROUTE_METRIC = (1 << 3)
};
union if_addr {