chiark / gitweb /
networkd: dhcp - use same metric for all DHCP-related routes
authorTom Gundersen <teg@jklm.no>
Sun, 29 Jun 2014 21:47:13 +0000 (23:47 +0200)
committerTom Gundersen <teg@jklm.no>
Mon, 30 Jun 2014 11:06:33 +0000 (13:06 +0200)
TODO
src/network/networkd-link.c

diff --git a/TODO b/TODO
index 10139e3..b63db04 100644 (file)
--- a/TODO
+++ b/TODO
@@ -615,6 +615,7 @@ Features:
    - add veth netdev support (c.f. http://shorewall.net/bridge-Shorewall-perl.html#veth)
    - add tun/tap netdev support
    - add more attribute support for SIT tunnel
+   - make metric of routes configurable
 
 * networkd-wait-online:
    - make operstates to wait for configurable?
index b597b16..8df7ff5 100644 (file)
@@ -546,6 +546,7 @@ static int link_enter_set_routes(Link *link) {
                         route_gw->dst_addr.in = gateway;
                         route_gw->dst_prefixlen = 32;
                         route_gw->scope = RT_SCOPE_LINK;
+                        route_gw->metrics = DHCP_STATIC_ROUTE_METRIC;
 
                         r = route_configure(route_gw, link, &route_handler);
                         if (r < 0) {
@@ -559,6 +560,7 @@ static int link_enter_set_routes(Link *link) {
 
                         route->family = AF_INET;
                         route->in_addr.in = gateway;
+                        route->metrics = DHCP_STATIC_ROUTE_METRIC;
 
                         r = route_configure(route, link, &route_handler);
                         if (r < 0) {