From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 1BB201FF145 for ; Thu, 22 Jan 2026 14:52:24 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5D56517A96; Thu, 22 Jan 2026 14:52:32 +0100 (CET) From: Hannes Laimer To: pve-devel@lists.proxmox.com Date: Thu, 22 Jan 2026 14:51:48 +0100 Message-ID: <20260122135151.292794-4-h.laimer@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260122135151.292794-1-h.laimer@proxmox.com> References: <20260122135151.292794-1-h.laimer@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1769089861948 X-SPAM-LEVEL: Spam detection results: 0 AWL -1.440 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLACK 3 Contains an URL listed in the URIBL blacklist [plugin.pm] Subject: [pve-devel] [PATCH pve-network 3/6] sdn: controller: prevent invalid router-id generation from zero mac 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" When a standard loopback interface is used, the retrieved MAC is typically 00:00:00:00:00:00. This causes the router-id generation logic to produce "0.0.0.0", which is an invalid BGP ID. Explicitly check for a zero MAC address and fail with a descriptive error. Signed-off-by: Hannes Laimer --- src/PVE/Network/SDN/Controllers/Plugin.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/PVE/Network/SDN/Controllers/Plugin.pm b/src/PVE/Network/SDN/Controllers/Plugin.pm index cab036a..45e2f46 100644 --- a/src/PVE/Network/SDN/Controllers/Plugin.pm +++ b/src/PVE/Network/SDN/Controllers/Plugin.pm @@ -120,6 +120,11 @@ sub get_router_id { die "can't autofind a router-id value from ip or mac" if !$mac; + if ($mac eq '00:00:00:00:00:00') { + die "Interface $iface has a zero MAC address. Cannot derive a BGP router-id. " + . "Please use a dummy interface or assign an IPv4 address to $iface.\n"; + } + my @mac_bytes = split(':', $mac); return hex($mac_bytes[2]) . "." -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel