Re: [PATCH 1/2] conf: Add <leasetime/> option for <dhcp/> settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 15, 2020 at 01:18:49PM -0300, Julio Faracco wrote:
> If an user is trying to configure a dhcp neetwork settings, it is not
> possible to change the leasetime of a range or a host entry. This is
> available using dnsmasq extra options, but they are associated with
> dhcp-range or dhcp-hosts fields. This patch implements a default
> leasetime for both. If this XML entry is defined, it applies leasetime
> for each range or host defined under DHCP scope.
> 
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=913446
> 
> Signed-off-by: Julio Faracco <jcfaracco@xxxxxxxxx>
> ---
>  docs/schemas/basictypes.rng |  9 ++++++
>  docs/schemas/network.rng    | 11 +++++++
>  src/conf/network_conf.c     | 62 ++++++++++++++++++++++++++++++++++++-
>  src/conf/network_conf.h     | 14 +++++++++
>  src/libvirt_private.syms    |  2 ++
>  src/network/bridge_driver.c | 37 ++++++++++++++++++++--
>  src/util/virdnsmasq.c       | 40 ++++++++++++------------
>  src/util/virdnsmasq.h       |  1 +
>  8 files changed, 152 insertions(+), 24 deletions(-)
> 
> diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng
> index 81465273c8..12f085c101 100644
> --- a/docs/schemas/basictypes.rng
> +++ b/docs/schemas/basictypes.rng
> @@ -607,4 +607,13 @@
>      </element>
>    </define>
>  
> +  <define name="leaseUnit">
> +    <choice>
> +      <value>seconds</value>
> +      <value>minutes</value>
> +      <value>hours</value>
> +      <value>infinite</value>

"infinite" is not really a unit - it is a value, so I don't think
we should have this. At least one version of Alberto's patches
used the value "0" to indicate no expiry, which I think is
reasonable, as 0 is otherwise invalid.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux