[Dnsmasq-discuss] DHCP lease hostname with multiple hosts of the same name

Petr Menšík pemensik at redhat.com
Fri Jul 2 14:42:22 UTC 2021


current dnsmasq has a bug [1] in handling hostname setting. When two
hosts request equal hostname, dnsmasq will reset name in previous lease
and change registered name to the most recent requestor adddress.

It does not work well with lease-script used by libvirt, because when
lease name is reset, such change is not propagated to script. It changes
only when dnsmasq is restarted. It does not load leases the same way,
only one of leases would contain name.

I have attached simple fix to propagate change to lease script. It would
make lease handler report correct state and it works nice with libvirt.

I am not sure current algorithm is the best one for leases reservation.
Replacement of previous lease hostname works even without restart after
attached change.

1. https://bugzilla.redhat.com/show_bug.cgi?id=1910621

Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: pemensik at redhat.com
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dnsmasq-2.85-lease-hostname.patch
Type: text/x-patch
Size: 716 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20210702/ee640e00/attachment.bin>

More information about the Dnsmasq-discuss mailing list