[pve-devel] [PATCH dnsmasq 0/1] purge previous ip/mac lease of dhcp reply

DERUMIER, Alexandre alexandre.derumier at groupe-cyllene.com
Fri Nov 17 11:46:12 CET 2023

> > If all you need is the `lease_prune()` call from your C patch,
> > dnsmasq
> > also does this on a SIGALRM so you could try to see if sending that
> > helps.
> > 
> > (dnsmasq also has a dbus api to add/remove leases for the worst
> > case...)

> > ah ok ! didn't known that, I'll try the SIGALRM && dbus to see.
> > Thanks
> > !

>>SIGALRM don't seem to work, 

>>but looking at dbus doc, that seem really even better
>>we could directly manage leases, without need to manage the ether
>>and without reload.

Ok, it's working with dbus to update the lease (and etherfile still


use Net::DBus;

my $bus = Net::DBus->system();
my $dnsmasq = $bus->get_service("uk.org.thekelleys.dnsmasq");
my $manager = $dnsmasq-

my @hostname = unpack("C*", "vmhostname");
$manager->AddDhcpLease('','12:45:6D:33:3C:E8', \@hostname,
undef, 0, 0, 0);

The problem is that dbus is only working with 1 instance of dnsmasq. :/

That mean it'll not work if we need mulitple instance, in differents
zones/vrf for example

More information about the pve-devel mailing list