SPAM: [PATCH pve-network v3 3/4] fix: register details in pve ipam db for add_next_freeip

lou lecrivain lou.lecrivain at wdz.de
Fri Dec 13 20:45:39 CET 2024


From: Lou Lecrivain <lou.lecrivain at wdz.de>

Signed-off-by: lou lecrivain <lou.lecrivain at wdz.de>
Tested-by: Stefan Hanreich <s.hanreich at proxmox.com>
Reviewed-by: Stefan Hanreich <s.hanreich at proxmox.com>
---
 src/PVE/Network/SDN/Ipams/PVEPlugin.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/PVE/Network/SDN/Ipams/PVEPlugin.pm b/src/PVE/Network/SDN/Ipams/PVEPlugin.pm
index 742f1b1..c225655 100644
--- a/src/PVE/Network/SDN/Ipams/PVEPlugin.pm
+++ b/src/PVE/Network/SDN/Ipams/PVEPlugin.pm
@@ -196,7 +196,11 @@ sub add_next_freeip {
 
 	die "can't find free ip in subnet '$cidr'\n" if !$freeip;
 
-	$dbsubnet->{ips}->{$freeip} = {};
+	$dbsubnet->{ips}->{$freeip} = {
+	    mac => $mac,
+	    hostname => $hostname,
+	    vmid => $vmid
+	};
 
 	write_db($db);
     });
-- 
2.47.0




More information about the pve-devel mailing list