projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
cc6792c
)
inotify: network/interfaces: fix 'Use of uninitialized value' for netmask
author
Thomas Lamprecht
<t.lamprecht@proxmox.com>
Wed, 12 Jun 2019 10:01:08 +0000
(12:01 +0200)
committer
Thomas Lamprecht
<t.lamprecht@proxmox.com>
Wed, 12 Jun 2019 10:01:08 +0000
(12:01 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/INotify.pm
patch
|
blob
|
blame
|
history
diff --git
a/src/PVE/INotify.pm
b/src/PVE/INotify.pm
index b6600412293d9cdb85c9bc35a6cff030e11b47d9..8b49f5a1a2061f89d6cc31564ae7ff25a6332925 100644
(file)
--- 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