[pve-devel] [PATCH pve-manager] Nodes: Check if target node even exists before sending WOL packet
Christian Ebner
c.ebner at proxmox.com
Fri Jan 18 10:12:56 CET 2019
Checks if the specified target node even exists before trying to read its MAC
address from the config and sending the wake on LAN magic packet.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
PVE/API2/Nodes.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 7f829b29..40ec6ee4 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -489,6 +489,7 @@ __PACKAGE__->register_method({
code => sub {
my ($param) = @_;
+ PVE::Cluster::check_node_exists($param->{node});
my $config = PVE::NodeConfig::load_config($param->{node});
my $mac_addr = $config->{wakeonlan};
if (!defined($mac_addr)) {
--
2.11.0
More information about the pve-devel
mailing list