diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-01-07 02:36:41 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-01-07 06:04:00 +0100 |
commit | ebf4fa1e82b71cb743518fa22dafb6860fd78bcf (patch) | |
tree | a9f0e4aa5967659bd3bbf1774f7bb2dc1851fa74 /src/network/networkd-json.c | |
parent | network/route-metric: introduce RouteMetric (diff) | |
download | systemd-ebf4fa1e82b71cb743518fa22dafb6860fd78bcf.tar.xz systemd-ebf4fa1e82b71cb743518fa22dafb6860fd78bcf.zip |
network/route-metric: manage uint32_t RTAX_XYZ attributes in the same way
Except for RTAX_CC_ALGO, all RTAX_XYZ attributes take uint32_t and
the kernel's default value is zero. So, let's unify handling of the
attributes.
This should not change any effective behavior. Just refactoring.
Diffstat (limited to 'src/network/networkd-json.c')
-rw-r--r-- | src/network/networkd-json.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkd-json.c b/src/network/networkd-json.c index 7b703bdfef..e62e57b765 100644 --- a/src/network/networkd-json.c +++ b/src/network/networkd-json.c @@ -251,7 +251,7 @@ static int route_append_json(Route *route, JsonVariant **array) { JSON_BUILD_PAIR_UNSIGNED("Priority", route->priority), JSON_BUILD_PAIR_UNSIGNED("Table", route->table), JSON_BUILD_PAIR_STRING("TableString", table), - JSON_BUILD_PAIR_UNSIGNED_NON_ZERO("MTU", route->metric.mtu), + JSON_BUILD_PAIR_UNSIGNED_NON_ZERO("MTU", route_metric_get(&route->metric, RTAX_MTU)), JSON_BUILD_PAIR_UNSIGNED("Preference", route->pref), JSON_BUILD_PAIR_UNSIGNED("Flags", route->flags), JSON_BUILD_PAIR_STRING("FlagsString", strempty(flags)), |