[pve-devel] [PATCH common 2/2] interfaces: improve bridge_fd handling

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Jul 16 12:56:57 CEST 2021


On 16.07.21 09:40, Fabian Grünbichler wrote:
> 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(-)
> 

applied, but ..

> 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";

this warns now also for the case when the user did not configured it at all
but *we* fell back to `0`.

I made two followups, one cleanup in general (independent of the changes in
this series) and one for above.

>  	}
>  	$done->{bridge_fd} = 1;
>  
> 







More information about the pve-devel mailing list