ipam: phpipam: add get_ip_from_mac error handling

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2024-01-04 17:11:38 +01:00 committed by Thomas Lamprecht
parent f38c18f7af
commit 9e65d5f597

View file

@ -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";