From abf1f9cf190fe4005b80316b80ddd37d80a86516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Fri, 16 Jul 2021 09:40:50 +0200 Subject: [PATCH] interfaces: improve bridge_fd handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and ignore values with a warning that are outside of the kernels expected range. Signed-off-by: Fabian Grünbichler --- src/PVE/INotify.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index 4f682be..ad45cd2 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -1265,8 +1265,10 @@ sub __interface_to_string { $v = defined($d->{bridge_fd}) ? $d->{bridge_fd} : 0; # 0 is only allowed when STP is disabled - if ($v || $no_stp) { + if ($no_stp || ($v >= 2 && $v <= 30)) { $raw .= "\tbridge-fd $v\n"; + } else { + warn "'$iface': not setting 'bridge_fd' to value '$v' outside of allowed range 2-30\n"; } $done->{bridge_fd} = 1;