]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/INotify.pm
inotify: read interfaces: avoid uninitialized value access
[pve-common.git] / src / PVE / INotify.pm
index d0d9ba6c35b86103ced909d9de19f553afcdef72..391b9d21b65353b3a0f9a750e155a8e9ced46436 100644 (file)
@@ -1097,10 +1097,12 @@ sub __read_etc_network_interfaces {
        } else {
            if ($d->{'vxlan-id'}) {
                $d->{type} = 'vxlan';
-           } elsif ($d->{ovs_type} eq 'OVSIntPort') {
-               $d->{type} = $d->{ovs_type};
-               my $tag = &$extract_ovs_option($d, 'tag');
-               $d->{ovs_tag} = $tag if defined($tag);
+           } elsif (defined($d->{ovs_type})) {
+               if ($d->{ovs_type} eq 'OVSIntPort') {
+                   $d->{type} = $d->{ovs_type};
+                   my $tag = &$extract_ovs_option($d, 'tag');
+                   $d->{ovs_tag} = $tag if defined($tag);
+               }
            }
        }