summaryrefslogtreecommitdiff
path: root/src/network/networkd-route.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-10-26 17:04:57 +0100
committerTom Gundersen <teg@jklm.no>2015-10-30 12:32:48 +0100
commit86655331bc28887def7998d321b14ef8fccbeaf9 (patch)
treeee9688d449630e5366f0dbe6d5a002cba29ae005 /src/network/networkd-route.c
parent2ce409569093f7c2c6732246978a901a27f2bce3 (diff)
networkd: route - clean up confusion between 'metric' and 'priority'
Different tools use different terms for the same concept, let's try to stick with 'priority', as that is what the netlink API uses.
Diffstat (limited to 'src/network/networkd-route.c')
-rw-r--r--src/network/networkd-route.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index 5674e0493b..078d9c1618 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -134,7 +134,6 @@ static int route_compare_func(const void *_a, const void *_b) {
switch (a->family) {
case AF_INET:
case AF_INET6:
- //TODO: check IPv6 routes
if (a->dst_prefixlen < b->dst_prefixlen)
return -1;
if (a->dst_prefixlen > b->dst_prefixlen)
@@ -232,7 +231,7 @@ int route_remove(Route *route, Link *link,
if (r < 0)
return log_error_errno(r, "Could not set scope: %m");
- r = sd_netlink_message_append_u32(req, RTA_PRIORITY, route->metrics);
+ r = sd_netlink_message_append_u32(req, RTA_PRIORITY, route->priority);
if (r < 0)
return log_error_errno(r, "Could not append RTA_PRIORITY attribute: %m");
@@ -314,7 +313,7 @@ int route_configure(Route *route, Link *link,
if (r < 0)
return log_error_errno(r, "Could not set scope: %m");
- r = sd_netlink_message_append_u32(req, RTA_PRIORITY, route->metrics);
+ r = sd_netlink_message_append_u32(req, RTA_PRIORITY, route->priority);
if (r < 0)
return log_error_errno(r, "Could not append RTA_PRIORITY attribute: %m");
@@ -521,9 +520,9 @@ int config_parse_route_priority(const char *unit,
if (r < 0)
return r;
- r = config_parse_unsigned(unit, filename, line, section,
- section_line, lvalue, ltype,
- rvalue, &n->metrics, userdata);
+ r = config_parse_uint32(unit, filename, line, section,
+ section_line, lvalue, ltype,
+ rvalue, &n->priority, userdata);
if (r < 0)
return r;