Long delay, I've returned to this. The many parameters seem a bit ugly (I'm no Dbus expert, so I may be wrong), especially having to includes is_temporary and IAID in DHCPv4 leases. One solution to this might be to have seperate AddDhcp4Lease and AddDhcp6Lease methods.
Another option may be to remove the is_temporary flag and only allow non-temporary leases to be created this way. Temporary leases are for random addresses (like privacy addresses in SLAAC) so there may be no need to be able to create them via this route. Final suggestion, which is more radical: just have one argument, which is a string, and looks like a line in the leases file. It would be easy to pass that to the parsing code in src/lease.c, saving much code. Scripting may be easier too. A request, would it be possible to have suitable updates to dbus/DBus-interface in the patch, whatever scheme is finally done? Cheers, Simon. On 29/04/15 12:17, Nicolas Cavallari wrote: > On 28/04/2015 22:58, Simon Kelley wrote: >> On 27/04/15 12:53, Nicolas Cavallari wrote: >>>> AddDhcpLease can be used to add or update a lease in the internal >>>> database, while DeleteDhcpLease deletes a lease. >> I can see the utility of DeleteDhcpLease (there's already a hacky >> little utility that does the same thing by faking a DHCPRELEASE message) >> . >> But what is the use of AddDhcpLease? > > Several people on the mailing list have expressed the need for it. > My use-case is a bit similar to the first one: > > http://article.gmane.org/gmane.network.dns.dnsmasq.general/7697 > > http://article.gmane.org/gmane.network.dns.dnsmasq.general/9310 > > http://article.gmane.org/gmane.network.dns.dnsmasq.general/1300 > > http://article.gmane.org/gmane.network.dns.dnsmasq.general/5336 > > _______________________________________________ > Dnsmasq-discuss mailing list > Dnsmasqfirstname.lastname@example.org > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss > _______________________________________________ Dnsmasq-discuss mailing list Dnsmasqemail@example.com http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss