On 1/18/19 10:12 AM, Christian Ebner wrote: > 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 <[email protected]> > --- > 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)) { >
applied, thanks! Added a followup which checks if the node parameter is the current local node. _______________________________________________ pve-devel mailing list [email protected] https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
