From: "DERUMIER, Alexandre" <alexandre.derumier@groupe-cyllene.com>
To: "w.bumiller@proxmox.com" <w.bumiller@proxmox.com>
Cc: "pve-devel@lists.proxmox.com" <pve-devel@lists.proxmox.com>,
"aderumier@odiso.com" <aderumier@odiso.com>,
"s.hanreich@proxmox.com" <s.hanreich@proxmox.com>
Subject: Re: [pve-devel] [PATCH dnsmasq 0/1] purge previous ip/mac lease of dhcp reply
Date: Fri, 17 Nov 2023 10:46:12 +0000 [thread overview]
Message-ID: <11fe3e649370ae17a659606a126f6ed1c9aff4cc.camel@groupe-cyllene.com> (raw)
In-Reply-To: <5db00bdc7d77c4bce037c1823a56150eb4b5ec15.camel@groupe-cyllene.com>
> > 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
>>https://github.com/imp/dnsmasq/blob/master/dbus/DBus-interface
>>
>>we could directly manage leases, without need to manage the ether
>>file
>>and without reload.
Ok, it's working with dbus to update the lease (and etherfile still
needed)
ex:
use Net::DBus;
my $bus = Net::DBus->system();
my $dnsmasq = $bus->get_service("uk.org.thekelleys.dnsmasq");
my $manager = $dnsmasq-
>get_object("/uk/org/thekelleys/dnsmasq","uk.org.thekelleys.dnsmasq");
my @hostname = unpack("C*", "vmhostname");
$manager->AddDhcpLease('192.168.2.10','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
next prev parent reply other threads:[~2023-11-17 10:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 21:58 Alexandre Derumier
2023-11-15 21:58 ` [pve-devel] [PATCH dnsmasq 1/1] purge old ip-mac lease on dhcpreply Alexandre Derumier
2023-11-16 9:43 ` [pve-devel] [PATCH dnsmasq 0/1] purge previous ip/mac lease of dhcp reply Stefan Hanreich
2023-11-16 13:47 ` DERUMIER, Alexandre
2023-11-17 6:49 ` DERUMIER, Alexandre
2023-11-17 8:55 ` Wolfgang Bumiller
2023-11-17 9:19 ` DERUMIER, Alexandre
2023-11-17 9:42 ` DERUMIER, Alexandre
2023-11-17 10:46 ` DERUMIER, Alexandre [this message]
2023-11-17 10:49 ` Stefan Hanreich
2023-11-17 10:52 ` DERUMIER, Alexandre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11fe3e649370ae17a659606a126f6ed1c9aff4cc.camel@groupe-cyllene.com \
--to=alexandre.derumier@groupe-cyllene.com \
--cc=aderumier@odiso.com \
--cc=pve-devel@lists.proxmox.com \
--cc=s.hanreich@proxmox.com \
--cc=w.bumiller@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox