summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandre Derumier <aderumier@odiso.com>2024-01-04 17:11:38 +0100
committerThomas Lamprecht <t.lamprecht@proxmox.com>2024-02-20 14:40:00 +0100
commit9e65d5f59726e05ae4cb13206482ad8f4ffadf82 (patch)
tree34573823d17d7a0e85036b77d33c71ee9d6bfdaa /src
parentf38c18f7af670071d9928695a8979d21e5254bf4 (diff)
ipam: phpipam: add get_ip_from_mac error handling
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Diffstat (limited to 'src')
-rw-r--r--src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm b/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm
index c38b3d0..ecefd77 100644
--- a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm
+++ b/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm
@@ -215,7 +215,8 @@ sub get_ips_from_mac {
my $ip4 = undef;
my $ip6 = undef;
- my $ips = PVE::Network::SDN::api_request("GET", "$url/addresses/search_mac/$mac", $headers);
+ my $ips = eval { PVE::Network::SDN::api_request("GET", "$url/addresses/search_mac/$mac", $headers) };
+ return if $@;
#fixme
die "parsing of result not yet implemented";