From 4da53043a618b557f3c0c8ccef81c537c4ad1e18 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 11 Jan 2023 13:11:00 +0900 Subject: network/l2tp: fix error code in log message --- src/network/netdev/l2tp-tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/network') diff --git a/src/network/netdev/l2tp-tunnel.c b/src/network/netdev/l2tp-tunnel.c index 7d51a619bd..335618f1a4 100644 --- a/src/network/netdev/l2tp-tunnel.c +++ b/src/network/netdev/l2tp-tunnel.c @@ -542,7 +542,7 @@ int config_parse_l2tp_tunnel_local_address( } if (in_addr_is_null(f, &a)) { - log_syntax(unit, LOG_WARNING, filename, line, r, + log_syntax(unit, LOG_WARNING, filename, line, 0, "L2TP Tunnel local address cannot be null, ignoring assignment: %s", rvalue); return 0; } @@ -598,7 +598,7 @@ int config_parse_l2tp_tunnel_remote_address( } if (in_addr_is_null(f, &a)) { - log_syntax(unit, LOG_WARNING, filename, line, r, + log_syntax(unit, LOG_WARNING, filename, line, 0, "L2TP Tunnel remote address cannot be null, ignoring assignment: %s", rvalue); return 0; } -- cgit v1.2.1 From bf4a5ac804d85a1e8df8226e8595219aa6fdafae Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 11 Jan 2023 13:11:36 +0900 Subject: network/l2tp: parse address or address type from correct string Fixes a bug introduced by 8b49ee2dcda04f8147650f7d9fb93662caf3ea2e. Fixes #26011. --- src/network/netdev/l2tp-tunnel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/network') diff --git a/src/network/netdev/l2tp-tunnel.c b/src/network/netdev/l2tp-tunnel.c index 335618f1a4..547de2418c 100644 --- a/src/network/netdev/l2tp-tunnel.c +++ b/src/network/netdev/l2tp-tunnel.c @@ -521,7 +521,7 @@ int config_parse_l2tp_tunnel_local_address( return log_oom(); } - type = l2tp_local_address_type_from_string(rvalue); + type = l2tp_local_address_type_from_string(addr_or_type); if (type >= 0) { free_and_replace(t->local_ifname, ifname); t->local_address_type = type; @@ -534,10 +534,10 @@ int config_parse_l2tp_tunnel_local_address( return 0; } - r = in_addr_from_string_auto(rvalue, &f, &a); + r = in_addr_from_string_auto(addr_or_type, &f, &a); if (r < 0) { log_syntax(unit, LOG_WARNING, filename, line, r, - "Invalid L2TP Tunnel local address specified, ignoring assignment: %s", rvalue); + "Invalid L2TP Tunnel local address \"%s\" specified, ignoring assignment: %s", addr_or_type, rvalue); return 0; } -- cgit v1.2.1