From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9])
	by lore.proxmox.com (Postfix) with ESMTPS id 4A4391FF172
	for <inbox@lore.proxmox.com>; Wed, 23 Apr 2025 12:46:38 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 33725180B0;
	Wed, 23 Apr 2025 12:46:12 +0200 (CEST)
From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Date: Wed, 23 Apr 2025 12:45:33 +0200
Message-ID: <20250423104556.644234-5-c.heiss@proxmox.com>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250423104556.644234-1-c.heiss@proxmox.com>
References: <20250423104556.644234-1-c.heiss@proxmox.com>
MIME-Version: 1.0
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.030 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
Subject: [pve-devel] [PATCH ifupdown2 4/7] d/patches: revert broken
 bridge-fd `validrange` clamping
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

See the patch itself for the rationale behind it.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
 ...-bridge-update-bridge-fd-valid-range.patch | 55 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 56 insertions(+)
 create mode 100644 debian/patches/pve/0012-Revert-addons-bridge-update-bridge-fd-valid-range.patch

diff --git a/debian/patches/pve/0012-Revert-addons-bridge-update-bridge-fd-valid-range.patch b/debian/patches/pve/0012-Revert-addons-bridge-update-bridge-fd-valid-range.patch
new file mode 100644
index 0000000..dbb8bfa
--- /dev/null
+++ b/debian/patches/pve/0012-Revert-addons-bridge-update-bridge-fd-valid-range.patch
@@ -0,0 +1,55 @@
+From 691b3a80713f4afb144f058610fc0a83ceb14be9 Mon Sep 17 00:00:00 2001
+From: Christoph Heiss <c.heiss@proxmox.com>
+Date: Thu, 17 Apr 2025 11:49:52 +0200
+Subject: [PATCH] Revert "addons: bridge: update bridge-fd valid range"
+
+This reverts commit 74d286d18f89d4f54c10dac2d2284408d46b5c0e.
+
+When STP is disabled on the bridge (i.e. `bridge-stp off`), 0 is
+actually a valid value for the bridge forward delay, aka. `bridge-fd 0`.
+
+According to kernel commit
+
+  8a921265e ("Revert "bridge: Allow forward delay to be cfgd when STP enabled"")
+
+this is actually by design [0], to immediately mark the bridge as
+forwarding with STP turned off.
+
+So revert the broken upstream commit.
+
+[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8a921265e2cd31e61a0c2eda582af54c5bfef897
+
+Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
+---
+ debian/changelog           | 1 -
+ ifupdown2/addons/bridge.py | 2 +-
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/debian/changelog b/debian/changelog
+index ed0d6622..9e8f12a0 100644
+--- a/debian/changelog
++++ b/debian/changelog
+@@ -39,7 +39,6 @@ ifupdown2 (3.3.0) unstable; urgency=medium
+   * Fix: keep link down after mac change if 'link-down yes' is specified
+   * Fix: addressvirtual: stale mac detection is missing vrr without ip
+   * Fix: bond: warn if sub interface is detected on bond slave
+-  * Fix: bridge: update bridge-fd valid range to 2-255
+ 
+  -- Julien Fortin <jfortin@nvidia.com>  Thu, 04 May 2023 23:42:42 -0700
+ 
+diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py
+index e70710ee..5a38d56c 100644
+--- a/ifupdown2/addons/bridge.py
++++ b/ifupdown2/addons/bridge.py
+@@ -98,7 +98,7 @@ class bridge(Bridge, moduleBase):
+             },
+             "bridge-fd": {
+                 "help": "bridge forward delay",
+-                "validrange": ["2", "255"],
++                "validrange": ["0", "255"],
+                 "example": ["bridge-fd 15"],
+                 "default": "15"
+             },
+-- 
+2.48.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 23ccbe6..eab43d8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ pve/0008-lacp-bond-remove-bond-min-links-0-warning.patch
 pve/0009-gvgeb-fix-python-interpreter-shebang.patch
 pve/0010-main-ignore-dpkg-files-when-running-hook-scripts.patch
 pve/0011-setup-drop-faulty-install-line-for-non-existing-ifup.patch
+pve/0012-Revert-addons-bridge-update-bridge-fd-valid-range.patch
-- 
2.49.0



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel