]> git.proxmox.com Git - pve-network.git/commitdiff
ipam: netbox : fix ip_is_gateway
authorAlexandre Derumier <aderumier@odiso.com>
Tue, 13 Feb 2024 08:48:58 +0000 (09:48 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 20 Feb 2024 14:06:09 +0000 (15:06 +0100)
Originally-by: Jasper Yu <007seadog@gmail.com>
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
src/PVE/Network/SDN/Ipams/NetboxPlugin.pm

index 14a69d9f2c33842b5fe0fe461d3d670f808d2280..d9232696e4cb638c788f94f3b01c8c13c6fb2d93 100644 (file)
@@ -283,7 +283,7 @@ sub get_ip_id {
 
 sub is_ip_gateway {
     my ($url, $ip, $headers) = @_;
-    my $result = PVE::Network::SDN::api_request("GET", "$url/addresses/search/$ip", $headers);
+    my $result = PVE::Network::SDN::api_request("GET", "$url/ipam/ip-addresses/?q=$ip", $headers);
     my $data = @{$result->{data}}[0];
     my $description = $data->{description};
     my $is_gateway = 1 if $description eq 'gateway';