When removing a gateway do not attempt to delete its entry from
macs.db since we do not have anything cached for the gateway anyway.

Reported-By: Wolfgang Bumiller <w.bumil...@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanre...@proxmox.com>
---
 src/PVE/Network/SDN/Subnets.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/Network/SDN/Subnets.pm b/src/PVE/Network/SDN/Subnets.pm
index 8e2a6aa..05d2de2 100644
--- a/src/PVE/Network/SDN/Subnets.pm
+++ b/src/PVE/Network/SDN/Subnets.pm
@@ -399,7 +399,7 @@ sub del_ip {
        my $plugin = 
PVE::Network::SDN::Ipams::Plugin->lookup($plugin_config->{type});
        $plugin->del_ip($plugin_config, $subnetid, $subnet, $ip);
 
-       eval { PVE::Network::SDN::Ipams::del_cache_mac_ip($mac, $ip); };
+       eval { PVE::Network::SDN::Ipams::del_cache_mac_ip($mac, $ip) if $mac; };
        warn $@ if $@;
     }
 
-- 
2.39.2


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to