]> git.proxmox.com Git - pve-network.git/commit
sdn: register MAC in IPAM if not found
authorStefan Lendl <s.lendl@proxmox.com>
Tue, 21 Nov 2023 14:55:54 +0000 (15:55 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 21 Nov 2023 19:34:10 +0000 (20:34 +0100)
commit596d9c238a0c3bee66ae7625e928a583ac099dbb
treecc6fb38966b6259943f1af751b9ac7c032cb1d6b
parent3bef780a5a8d85b26f4406ef13d14820d759d3e0
sdn: register MAC in IPAM if not found

if inside add_dhcp_mapping, which is called at VM or LCX start, we do
not find an IP in IPAM, register the MAC.

This is very useful as a fallback if for some reason an IP mapping was
deleted or there is a bug somewhere that does not register an IP.

This acts more like DHCP to allocate an IP on demand.

In order to properly register the IP, the VMID and hostname is required
as a parameter.

Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
src/PVE/Network/SDN/Vnets.pm