summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/network/networkd-route-nexthop.c12
-rw-r--r--src/shared/conf-parser.c4
2 files changed, 6 insertions, 10 deletions
diff --git a/src/network/networkd-route-nexthop.c b/src/network/networkd-route-nexthop.c
index 3b1da1801f..c1b191b3ef 100644
--- a/src/network/networkd-route-nexthop.c
+++ b/src/network/networkd-route-nexthop.c
@@ -124,14 +124,10 @@ int config_parse_route_gateway_onlink(
return 0;
}
- r = parse_boolean(rvalue);
- if (r < 0) {
- log_syntax(unit, LOG_WARNING, filename, line, r,
- "Could not parse %s=\"%s\", ignoring assignment: %m", lvalue, rvalue);
- return 0;
- }
-
- route->gateway_onlink = r;
+ r = config_parse_tristate(unit, filename, line, section, section_line, lvalue, ltype, rvalue,
+ &route->gateway_onlink, network);
+ if (r <= 0)
+ return r;
TAKE_PTR(route);
return 0;
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index e34ebcca6e..f5efc7618a 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -1064,7 +1064,7 @@ int config_parse_tristate(
if (isempty(rvalue)) {
*t = -1;
- return 0;
+ return 1;
}
r = parse_tristate(rvalue, t);
@@ -1074,7 +1074,7 @@ int config_parse_tristate(
return 0;
}
- return 0;
+ return 1;
}
int config_parse_string(