summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Chapman <mike@very.puzzling.org>2016-08-18 17:54:12 +1000
committerMichael Chapman <mike@very.puzzling.org>2016-08-18 17:54:12 +1000
commita0d95bbc38e60b1ac0b6b57d7a0ac3246d1576be (patch)
treeda7e1593bf5e6cea2af11b1868e10acef956745d
parent3bdccf69ca626d6c2f6653044f1f68d9c9da0e42 (diff)
networkd: use RT_TABLE_MAIN by default
The default route table used by sd-netlink (and iproute2) is RT_TABLE_MAIN, not RT_TABLE_DEFAULT. Ensure networkd has the same idea.
-rw-r--r--src/network/networkd-route.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index 5335df53c7..b197a5da6b 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -41,7 +41,7 @@ int route_new(Route **ret) {
route->family = AF_UNSPEC;
route->scope = RT_SCOPE_UNIVERSE;
route->protocol = RTPROT_UNSPEC;
- route->table = RT_TABLE_DEFAULT;
+ route->table = RT_TABLE_MAIN;
route->lifetime = USEC_INFINITY;
*ret = route;
@@ -549,14 +549,12 @@ int route_configure(
if (r < 0)
return log_error_errno(r, "Could not set flags: %m");
- if (route->table != RT_TABLE_DEFAULT) {
-
+ if (route->table != RT_TABLE_MAIN) {
if (route->table < 256) {
r = sd_rtnl_message_route_set_table(req, route->table);
if (r < 0)
return log_error_errno(r, "Could not set route table: %m");
} else {
-
r = sd_rtnl_message_route_set_table(req, RT_TABLE_UNSPEC);
if (r < 0)
return log_error_errno(r, "Could not set route table: %m");