From: Robin Christ <robin@rchrist.io>
To: pve-devel@lists.proxmox.com
Cc: Robin Christ <r.christ@partimus.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 [thread overview]
Message-ID: <20260330213921.533853-4-robin@rchrist.io> (raw)
In-Reply-To: <20260330213921.533853-1-robin@rchrist.io>
From: Robin Christ <r.christ@partimus.com>
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 <r.christ@partimus.com>
---
...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 <r.christ@partimus.com>
+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
next prev parent reply other threads:[~2026-03-30 21:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 21:39 [PATCH ifupdown2 0/4] Fix multiple Single VXLAN Devices in bridge and some dry-run fixes Robin Christ
2026-03-30 21:39 ` [PATCH ifupdown2 1/4] nlcache: Fix missing nodad option in addr_add_dry_run Robin Christ
2026-03-30 21:39 ` [PATCH ifupdown2 2/4] nlcache: Add missing link_set_mtu_dry_run method Robin Christ
2026-03-30 21:39 ` Robin Christ [this message]
2026-03-30 21:39 ` [PATCH ifupdown2 4/4] bridge: Fix multiple Single VXLAN Devices in bridge not having tunnel_info applied on first run Robin Christ
2026-03-31 8:18 ` Gabriel Goller
2026-03-31 11:45 ` Robin Christ
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260330213921.533853-4-robin@rchrist.io \
--to=robin@rchrist.io \
--cc=pve-devel@lists.proxmox.com \
--cc=r.christ@partimus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox