• N
    leaseshelper: improvements to support all events · 0f87054b
    Nehal J Wani 提交于
    This patch enables the helper program to detect event(s) triggered when
    there is a change in lease length or expiry and client-id. This
    transfers complete control of leases database to libvirt and obsoletes
    use of the lease database file (<network-name>.leases). That file will
    not be created, read, or written.  This is achieved by adding the option
    --leasefile-ro to dnsmasq and passing a custom env var to leaseshelper,
    which helps us map events related to leases with their corresponding
    network bridges, no matter what the event be.
    
    Also, this requires the addition of a new non-lease entry in our custom
    lease database: "server-duid". It is required to identify a DHCPv6
    server.
    
    Now that dnsmasq doesn't maintain its own leases database, it relies on
    our helper program to tell it about previous leases and server duid.
    Thus, this patch makes our leases program honor an extra action: "init",
    in which it sends the known info in a particular format to dnsmasq
    by printing it to stdout.
    
    The drawback of this change is that upgrade to this new approach does
    not transfer the existing leases for the network if the leaseshelper
    wasn't already used.
    0f87054b
leaseshelper.c 16.7 KB