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 929A71FF141 for ; Mon, 30 Mar 2026 23:47:34 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A909F9413; Mon, 30 Mar 2026 23:47:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rchrist.io; s=default; t=1774906784; bh=RvgarmO3yvz+pSWJQDcznTcdrUBW/BICHsM9JBkP39I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dK5Z5rdyhEDkRDBA8Ju1NfglHM+Pfcucuf9ulxbnsmmTinyA+p0d3ixuGy3SJjK3s up8jAuPiwg8StDaaKjWSFoIiNGiNq07cuY6XIeDQ643uER6uhHx4stWv/MSftBzYl6 lonMHwBPC0CC29n0XnEpeI9hymzAKyilx5SQqljmVmdxyaL3akG2NxVpBrWO11BQrT jJVXnKlxqam9MTgipcBzza6b+saSOqDTg8V6s5G3WJbYy+p5qB1mOkqkCA0DDkmVky gq7jhM7BVT9z32218CEGJaa1/xHYripTDBq8lcX2YpXRvxfDAd42xo6XMF5MT4k6Kz XwaEmtxaFDrug== From: Robin Christ To: pve-devel@lists.proxmox.com Subject: [PATCH ifupdown2 3/4] iproute2: Fix bridge_link_update_vni_filter for dry-run Date: Mon, 30 Mar 2026 23:39:20 +0200 Message-ID: <20260330213921.533853-4-robin@rchrist.io> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260330213921.533853-1-robin@rchrist.io> References: <20260330213921.533853-1-robin@rchrist.io> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4fl4Qp5dhQz2xJM X-SPAM-LEVEL: Spam detection results: 0 BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_MISSING 0.1 Missing DMARC policy RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no trust RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 1 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 1 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 1 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_PASS -0.001 SPF: HELO matches SPF record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: VAJIXVTOP4IDSEQAJYFEHCM4PWFZSNBP X-Message-ID-Hash: VAJIXVTOP4IDSEQAJYFEHCM4PWFZSNBP X-MailFrom: robin@rchrist.io X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Robin Christ X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Robin Christ This appears to have been primarily a simple indentation error (block should've been in indented, but was not) During dry run, the command "bridge -j -p vni show dev %s" will not be executed and thus return empty string. vnishow will be None and accessing it will err. Signed-off-by: Robin Christ --- ...e_link_update_vni_filter-for-dry-run.patch | 62 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 63 insertions(+) create mode 100644 debian/patches/pve/0018-iproute2-fix-bridge_link_update_vni_filter-for-dry-run.patch diff --git a/debian/patches/pve/0018-iproute2-fix-bridge_link_update_vni_filter-for-dry-run.patch b/debian/patches/pve/0018-iproute2-fix-bridge_link_update_vni_filter-for-dry-run.patch new file mode 100644 index 0000000..4ab9f16 --- /dev/null +++ b/debian/patches/pve/0018-iproute2-fix-bridge_link_update_vni_filter-for-dry-run.patch @@ -0,0 +1,62 @@ +From: Robin Christ +Date: Mon, 30 Mar 2026 19:14:26 +0200 +Subject: iproute2: Fix bridge_link_update_vni_filter for dry-run + +This appears to have been primarily a simple indentation error (block +should've been in indented, but was not) + +During dry run, the command "bridge -j -p vni show dev %s" will not +be executed and thus return empty string. vnishow will be None +and accessing it will err. +--- + ifupdown2/lib/iproute2.py | 35 +++++++++++++++++++---------------- + 1 file changed, 19 insertions(+), 16 deletions(-) + +diff --git a/ifupdown2/lib/iproute2.py b/ifupdown2/lib/iproute2.py +index 15b581e..894afd3 100644 +--- a/ifupdown2/lib/iproute2.py ++++ b/ifupdown2/lib/iproute2.py +@@ -1044,24 +1044,27 @@ class IPRoute2(Cache, Requirements): + output = utils.exec_command(cmd) + if output: + vnishow = json.loads(output.strip("\n")) +- self.logger.debug(vnishow) +- for s in vnishow: +- vlist = s.get('vnis') +- for v in vlist: +- vstart = v.get('vni') +- vend = v.get('vniEnd') +- group = v.get('group') +- if vend: +- for tv in range(int(vstart), int(vend)+1): ++ self.logger.debug(vnishow) ++ for s in vnishow: ++ vlist = s.get('vnis') ++ for v in vlist: ++ vstart = v.get('vni') ++ vend = v.get('vniEnd') ++ group = v.get('group') ++ if vend: ++ for tv in range(int(vstart), int(vend)+1): ++ if group: ++ rvnisd[tv] = group ++ else: ++ rvnisd[tv] = None ++ else: + if group: +- rvnisd[tv] = group ++ rvnisd[int(vstart)] = group + else: +- rvnisd[tv] = None +- else: +- if group: +- rvnisd[int(vstart)] = group +- else: +- rvnisd[int(vstart)] = None ++ rvnisd[int(vstart)] = None ++ else: ++ self.logger.debug("%s: no output - dry run? Assuming no vnis assigned" % cmd) ++ + vnis_int = vnisd.keys() + rvnis_int = rvnisd.keys() + diff --git a/debian/patches/series b/debian/patches/series index 45d92cb..1dc2fc6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -18,3 +18,4 @@ pve/0014-nlmanager-read-ipv6-devconf-disable_ipv6-attribute-t.patch pve/0015-revert-addons-bond-warn-if-sub-interface-is-detected-on-bond-slave.patch pve/0016-nlcache-fix-missing-nodad-option-in-addr_add_dry_run.patch pve/0017-nlcache-add-missing-link_set_mtu_dry_run-method.patch +pve/0018-iproute2-fix-bridge_link_update_vni_filter-for-dry-run.patch -- 2.47.3