mirror of
git://git.proxmox.com/git/pve-common.git
synced 2025-01-08 01:17:37 +03:00
interfaces: improve bridge_fd handling
and ignore values with a warning that are outside of the kernels expected range. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
e960f7948f
commit
abf1f9cf19
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user