]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network/l2tp: parse address or address type from correct string 26014/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 11 Jan 2023 04:11:36 +0000 (13:11 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 11 Jan 2023 04:20:14 +0000 (13:20 +0900)
Fixes a bug introduced by 8b49ee2dcda04f8147650f7d9fb93662caf3ea2e.

Fixes #26011.

src/network/netdev/l2tp-tunnel.c

index 335618f1a45a59c01d43ab7c88975be1671f672a..547de2418c498d8ec5b5bbf74cf613bb9b83c08e 100644 (file)
@@ -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;
         }