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.
This commit is contained in:
Yu Watanabe
2024-01-07 14:04:00 +09:00
parent d32a520b09
commit ebf4fa1e82
6 changed files with 169 additions and 125 deletions
-1
View File
@@ -35,7 +35,6 @@ int route_new(Route **ret) {
.type = RTN_UNICAST,
.table = RT_TABLE_MAIN,
.lifetime_usec = USEC_INFINITY,
.metric = ROUTE_METRIC_NULL,
.gateway_onlink = -1,
};