[pve-devel] [PATCH pve-network] subnets: only delete macs.db entries if mac is available
Stefan Hanreich
s.hanreich at proxmox.com
Wed Nov 22 13:27:28 CET 2023
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.bumiller at proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich at 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
More information about the pve-devel
mailing list