[pve-devel] [PATCH common 2/2] interfaces: improve bridge_fd handling
Fabian Grünbichler
f.gruenbichler at proxmox.com
Fri Jul 16 09:40:50 CEST 2021
and ignore values with a warning that are outside of the kernels
expected range.
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
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;
--
2.30.2
More information about the pve-devel
mailing list