From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 7240D1FF184 for ; Thu, 18 Dec 2025 16:01:11 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 255311F958; Thu, 18 Dec 2025 16:02:00 +0100 (CET) From: Maximiliano Sandoval To: pve-devel@lists.proxmox.com Date: Thu, 18 Dec 2025 16:01:24 +0100 Message-ID: <20251218150126.832313-1-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1766070074487 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.090 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_SHORT 0.001 Use of a URL Shortener for very short URL RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH container v2 1/2] fix #7156: setup: separate dns list with semicolons X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Network Manager uses GLib's key file format [1]. While the format allows either comma or semicolon-separated lists, this choice is global for the key file and Network Manager declares that their key file uses the later. As per `man 5 nm-settings-keyfile`: > lists are separated by character ; Additionally, tables 6 and 7 from the manual contain examples for dns: > Example: dns=1.2.3.4;8.8.8.8;8.8.4.4; > Example: dns=2001:4860:4860::8888;2001:4860:4860::8844; There are, however, a handful of lists mentioned in the man page which use a different format: > some lists of complex values (addresses, routes, routing-rules), > instead of using a semicolon separated list, use one key-value pair > per list element, with the key being the singular of the property name > followed by the numeric index (i.e address1, address2, ...). so care should be taken when revisiting lists in this context. For example, routes are not lists per se (they are strings) but they allow (cf. table 6): > Example: route1=8.8.8.0/24,10.1.1.1,77 [1] https://docs.gtk.org/glib/struct.KeyFile.html Signed-off-by: Maximiliano Sandoval --- Differences from v1: - Expanded commit message - Added a tests @thomas, when running `make test` on src/test I get: ``` # ... TEST test-centos10-001 => OK # ... All tests successful. Files=1, Tests=5, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.19 cusr 0.02 csys = 0.22 CPU) Result: PASS ``` but I am not sure if I am missing anything. src/PVE/LXC/Setup/CentOS.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PVE/LXC/Setup/CentOS.pm b/src/PVE/LXC/Setup/CentOS.pm index 0826977..7bccca2 100644 --- a/src/PVE/LXC/Setup/CentOS.pm +++ b/src/PVE/LXC/Setup/CentOS.pm @@ -244,7 +244,7 @@ sub setup_network_with_networkmanager { } } if (@name_servers_v4) { - $data .= "dns=" . join(',', @name_servers_v4) . "\n"; + $data .= "dns=" . join(';', @name_servers_v4) . "\n"; $data .= "dns-search=" . join(' ', PVE::Tools::split_list($searchdomains)) . "\n" if $searchdomains; } @@ -270,7 +270,7 @@ sub setup_network_with_networkmanager { } } if (@name_servers_v6) { - $data .= "dns=" . join(',', @name_servers_v6) . "\n"; + $data .= "dns=" . join(';', @name_servers_v6) . "\n"; $data .= "dns-search=" . join(' ', PVE::Tools::split_list($searchdomains)) . "\n" if $searchdomains; } -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel