From: Thomas Lamprecht Date: Wed, 12 Jun 2019 10:01:08 +0000 (+0200) Subject: inotify: network/interfaces: fix 'Use of uninitialized value' for netmask X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=4515aaec1ea703a4de7648ebb8db363664577509;ds=sidebyside inotify: network/interfaces: fix 'Use of uninitialized value' for netmask Signed-off-by: Thomas Lamprecht --- diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index b660041..8b49f5a 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -1106,7 +1106,7 @@ sub __read_etc_network_interfaces { # map address and netmask to cidr if ($d->{address}) { - if ($d->{netmask} =~ m/^\d+$/) { # e.g. netmask 20 + if ($d->{netmask} && $d->{netmask} =~ m/^\d+$/) { # e.g. netmask 20 $d->{cidr} = $d->{address} . "/" . $d->{netmask}; } elsif ($d->{netmask} && (my $cidr = PVE::JSONSchema::get_netmask_bits($d->{netmask}))) { # e.g. netmask 255.255.255.0