[pve-devel] [pve-network 4/5] ipam: phpipam: fix get_ip_from_mac
Alexandre Derumier
aderumier at odiso.com
Thu Jan 4 17:11:38 CET 2024
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm b/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm
index f3f22b5..bb9f322 100644
--- a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm
+++ b/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm
@@ -215,8 +215,11 @@ 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 = undef;
+ eval {
+ $ips = PVE::Network::SDN::api_request("GET", "$url/addresses/search_mac/$mac", $headers);
+ };
+ return if $@;
#fixme
die "parsing of result not yet implemented";
--
2.39.2
More information about the pve-devel
mailing list