mirror of
https://git.proxmox.com/git/pve-common
synced 2025-04-28 12:10:17 +00:00
inotify: interfaces: check if bridge_vids is truthy instead of defined
The old check for defined would also be true if it contained an empty string. By checking its truthyness, an empty string will be falsy and therefore the default value will be used. Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
This commit is contained in:
parent
34dec45c43
commit
a8b8920d54
@ -1311,7 +1311,7 @@ sub __interface_to_string {
|
||||
|
||||
if (defined($d->{bridge_vlan_aware})) {
|
||||
$raw .= "\tbridge-vlan-aware yes\n";
|
||||
my $vlans = defined($d->{bridge_vids}) ? $d->{bridge_vids} : "2-4094";
|
||||
my $vlans = $d->{bridge_vids} ? $d->{bridge_vids} : "2-4094";
|
||||
$raw .= "\tbridge-vids $vlans\n";
|
||||
}
|
||||
$done->{bridge_vlan_aware} = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user