* [pve-devel] [PATCH pve-network] sdn: Avoid warning of uninitialized variable on VM start
@ 2023-11-23 13:21 Stefan Lendl
0 siblings, 0 replies; only message in thread
From: Stefan Lendl @ 2023-11-23 13:21 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
---
src/PVE/Network/SDN/Vnets.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/PVE/Network/SDN/Vnets.pm b/src/PVE/Network/SDN/Vnets.pm
index 0dfdfd7..4f313e3 100644
--- a/src/PVE/Network/SDN/Vnets.pm
+++ b/src/PVE/Network/SDN/Vnets.pm
@@ -200,6 +200,8 @@ sub add_dhcp_mapping {
print "No IP found for MAC: $mac for VMID:$vmid\n";
add_next_free_cidr($vnetid, $name, $mac, "$vmid", undef, 1);
($ip4, $ip6) = PVE::Network::SDN::Vnets::get_ips_from_mac($vnetid, $mac);
+ $ip4 //= '';
+ $ip6 //= '';
print "got new IP from IPAM: $ip4 $ip6\n";
}
PVE::Network::SDN::Dhcp::add_mapping($vnetid, $mac, $ip4, $ip6) if $ip4 || $ip6;
--
2.42.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-23 13:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-23 13:21 [pve-devel] [PATCH pve-network] sdn: Avoid warning of uninitialized variable on VM start Stefan Lendl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox