summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-routing-policy-rule.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-06-03 16:37:38 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-06-06 09:52:52 +0200
commitc71384a9ee73c1488d831b09f5ee88a804e1ddcd (patch)
tree13116e7a71d9607f4506a9499e3c427215b0fe84 /src/network/networkd-routing-policy-rule.c
parentbasic/in-addr-util: drop check for prefix length in formatting function (diff)
downloadsystemd-c71384a9ee73c1488d831b09f5ee88a804e1ddcd.tar.xz
systemd-c71384a9ee73c1488d831b09f5ee88a804e1ddcd.zip
basic/in-addr-util: add IN_ADDR_PREFIX_TO_STRING
Diffstat (limited to 'src/network/networkd-routing-policy-rule.c')
-rw-r--r--src/network/networkd-routing-policy-rule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/networkd-routing-policy-rule.c b/src/network/networkd-routing-policy-rule.c
index 8f4297a86a..71c4360fa3 100644
--- a/src/network/networkd-routing-policy-rule.c
+++ b/src/network/networkd-routing-policy-rule.c
@@ -414,7 +414,7 @@ static int routing_policy_rule_acquire_priority(Manager *manager, RoutingPolicyR
}
static void log_routing_policy_rule_debug(const RoutingPolicyRule *rule, const char *str, const Link *link, const Manager *m) {
- _cleanup_free_ char *state = NULL, *from = NULL, *to = NULL, *table = NULL;
+ _cleanup_free_ char *state = NULL, *table = NULL;
assert(rule);
assert(IN_SET(rule->family, AF_INET, AF_INET6));
@@ -427,14 +427,14 @@ static void log_routing_policy_rule_debug(const RoutingPolicyRule *rule, const c
return;
(void) network_config_state_to_string_alloc(rule->state, &state);
- (void) in_addr_prefix_to_string(rule->family, &rule->from, rule->from_prefixlen, &from);
- (void) in_addr_prefix_to_string(rule->family, &rule->to, rule->to_prefixlen, &to);
(void) manager_get_route_table_to_string(m, rule->table, &table);
log_link_debug(link,
"%s %s routing policy rule (%s): priority: %"PRIu32", %s -> %s, iif: %s, oif: %s, table: %s",
str, strna(network_config_source_to_string(rule->source)), strna(state),
- rule->priority, strna(from), strna(to),
+ rule->priority,
+ IN_ADDR_PREFIX_TO_STRING(rule->family, &rule->from, rule->from_prefixlen),
+ IN_ADDR_PREFIX_TO_STRING(rule->family, &rule->to, rule->to_prefixlen),
strna(rule->iif), strna(rule->oif), strna(table));
}