summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-route-metric.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* network/route-metric: merge conf parsers for route metricYu Watanabe2024-10-111-84/+32
| | | | | This introduces a generic [Route] section parser, then embed conf parsers for route metric into it.
* network/route-metric: use log_syntax_parse_error()Yu Watanabe2024-10-111-25/+12
|
* Replace strdup_or_null() by strdup_to()Zbigniew Jędrzejewski-Szmek2024-03-201-1/+1
| | | | | | I didn't know that this helper existed… It is very similar to strdup_to_full(), but all callers can actually be replaced by strdup_to(), which has more fitting semantics.
* network/route: remove existing route if some property conflict with ↵Yu Watanabe2024-02-141-0/+22
| | | | | | requested ones Fixes #28853.
* network/route: introduce ref/unref functions for Route objectYu Watanabe2024-01-251-2/+2
| | | | | | | Then, Route object can live if it is detached from the owner (Manager, Network, or Wireguard object). This is the one for routes of ebd96906477aac2bbc6b9de0d6e9bd0f39db5581.
* network: use strdup_or_null() where appropriateYu Watanabe2024-01-191-1/+1
|
* network/route-metric: invalidate [Route] section if an invalid string is ↵Yu Watanabe2024-01-071-5/+2
| | | | | | specified Follow-up for 18c4c5d84f756b144a1823f3de8bc0e61264b976.
* network/route-metric: use DEFINE_CONFIG_PARSE_ROUTE_METRIC() macro moreYu Watanabe2024-01-071-97/+20
|
* network/route-metric: introduce DEFINE_CONFIG_PARSE_ROUTE_METRIC() macroYu Watanabe2024-01-071-93/+61
| | | | | Then, define config_parse_route_metric_mtu() and _tcp_window() through the macro.
* network/route-metric: manage uint32_t RTAX_XYZ attributes in the same wayYu Watanabe2024-01-071-95/+133
| | | | | | | | 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.
* network/route-metric: introduce RouteMetricYu Watanabe2024-01-071-11/+162
| | | | | | | | Then, split out route metric handling from networkd-route.c to networkd-route-metric.c. No functional change, just refactoring and preparation for later commits.
* network/route-metric: unify error messagesYu Watanabe2024-01-061-21/+11
|
* network/route-metric: pass attribute type to conf parsersYu Watanabe2024-01-061-9/+9
| | | | | | | | | | The passed attribute type will be used later. This also - rename conf parsers, - sort gperf entries by the attr type. No functional change, just refactoring and preparation for later commits.
* network/route: move several conf parsers to networkd-route-metric.c and ↵Yu Watanabe2024-01-061-0/+394
networkd-route-nexthop.c This also split config_parse_route_boolean() into two: for GatewayOnline= and boolean route metrics. No functional change, just refactoring and preparation for later commits.