5
0
mirror of git://git.proxmox.com/git/pve-network.git synced 2025-01-23 02:04:20 +03:00

subnets: only delete macs.db entries if mac is available

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@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
This commit is contained in:
Stefan Hanreich 2023-11-22 13:27:28 +01:00 committed by Wolfgang Bumiller
parent d34cd5d180
commit 5aea20cd5b

View File

@ -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 $@;
}