mirror of
https://git.proxmox.com/git/pve-common
synced 2025-07-27 13:44:54 +00:00
inotify: read interfaces: avoid uninitialized value access
check if 'ovs_type' is defined first Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
4566729d4e
commit
d2513a84df
@ -1097,10 +1097,12 @@ sub __read_etc_network_interfaces {
|
|||||||
} else {
|
} else {
|
||||||
if ($d->{'vxlan-id'}) {
|
if ($d->{'vxlan-id'}) {
|
||||||
$d->{type} = 'vxlan';
|
$d->{type} = 'vxlan';
|
||||||
} elsif ($d->{ovs_type} eq 'OVSIntPort') {
|
} elsif (defined($d->{ovs_type})) {
|
||||||
$d->{type} = $d->{ovs_type};
|
if ($d->{ovs_type} eq 'OVSIntPort') {
|
||||||
my $tag = &$extract_ovs_option($d, 'tag');
|
$d->{type} = $d->{ovs_type};
|
||||||
$d->{ovs_tag} = $tag if defined($tag);
|
my $tag = &$extract_ovs_option($d, 'tag');
|
||||||
|
$d->{ovs_tag} = $tag if defined($tag);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user