1. 22 2月, 2019 3 次提交
    • L
      network: add netmask to dhcp range of dnsmasq conf file for IPv4 · 82fe58ff
      Laine Stump 提交于
      dnsmasq documentation says that the *IPv4* prefix/network
      address/broadcast address sent to dhcp clients will be automatically
      determined by dnsmasq by looking at the interface it's listening on,
      so the original libvirt code did not add a netmask to the dnsmasq
      commandline (or later, the dnsmasq conf file).
      
      For *IPv6* however, dnsmasq apparently cannot automatically determine
      the prefix (functionally the same as a netmask), and it must be
      explicitly provided in the conf file (as a part of the dhcp-range
      option). So many years after IPv4 DHCP support had been added, when
      IPv6 dhcp support was added the prefix was included at the end of the
      dhcp-range setting, but only for IPv6.
      
      A user had reported a bug on a host where one of the interfaces was a
      superset of the libvirt network where dhcp is needed (e.g., the host's
      ethernet is 10.0.0.20/8, and the libvirt network is 10.10.0.1/24). For
      some reason dnsmasq was supplying the netmask for the /8 network to
      clients requesting an address on the /24 interface.
      
      This seems like a bug in dnsmasq, but even if/when it gets fixed
      there, it looks like there is no harm in just always adding the
      netmask to all IPv4 dhcp-range options similar to how prefix is added
      to all IPv6 dhcp-range options.
      Signed-off-by: NLaine Stump <laine@laine.org>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      82fe58ff
    • L
      util: set missing data length in virSocketAddrPrefixToNetmask() · abb293a5
      Laine Stump 提交于
      This fixes a bug that has been present since the original version of
      the function was pushed in commit 1ab80f32 on Nov. 26 2010 (by me). The
      virSocketAddr::len was not being set.
      
      Apparently until now we were always calling
      virSocketAddrPrefixToNetmask with virSocketAddr object that was
      already (coincidentally) initialized for the proper address family,
      but the bug became apparent when trying to use it to fill in an
      otherwise uninitialized object.
      Signed-off-by: NLaine Stump <laine@laine.org>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      abb293a5
    • E
      snapshot: Saner use of uuid · c900474e
      Eric Blake 提交于
      Most of the code base is fairly consistent about using the name
      'uuidstr' when dealing with a formatted human-readable form, and
      'uuid' when dealing with the smaller raw bytes form. Fix
      snapshot_conf to comply, as well as reducing the scope of a human
      string to only the error message that needs it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c900474e
  2. 21 2月, 2019 3 次提交
  3. 20 2月, 2019 29 次提交
  4. 19 2月, 2019 5 次提交