1. 20 2月, 2018 2 次提交
    • L
      conf: move 'generated' member from virMacAddr to virDomainNetDef · e62cb4a9
      Laine Stump 提交于
      Commit 7e62c4cd (first appearing in libvirt-3.9.0 as a resolution
      to rhbz #1343919) added a "generated" attribute to virMacAddr that was
      set whenever a mac address was auto-generated by libvirt. This
      knowledge was used in a single place - when trying to match a NetDef
      from the Domain to Delete with user-provided XML. Since the XML parser
      always auto-generates a MAC address for NetDefs when none is provided,
      it was previously impossible to make a search where the MAC address
      isn't significant, but the addition of the "generated" attribute made
      it possible for the search function to ignore auto-generated MACs.
      
      This implementation had a problem though - it was adding a field to a
      "low level" struct - virMacAddr - which is used in other places with
      the assumption that it contains exactly a 6 byte MAC address and
      nothing else. In particular, virNWFilterSnoopEthHdr uses virMacAddr as
      part of the definition of an ethernet packet header, whose layout must
      of course match an actual ethernet packet. Adding the extra bools into
      virNWFilterSnoopEthHdr caused the nwfilter driver's "IP discovery via
      DHCP packet snooping" functionality to mysteriously stop working.
      
      In order to fix that behavior, and prevent potential future similar
      odd behavior, this patch moves the "generated" member out of
      virMacAddr (so that it is again really is just a MAC address) into
      virDomainNetDef, and sets it only when virDomainNetGenerateMAC() is
      called from virDomainNetDefParseXML() (which is the only time we care
      about it).
      
      Resolves: https://bugzilla.redhat.com/1529338
      
      (It should also be applied to any maintenance branch that applies
      commit 7e62c4cd and friends to resolve
      https://bugzilla.redhat.com/1343919)
      Signed-off-by: NLaine Stump <laine@laine.org>
      e62cb4a9
    • A
      2f06f433
  2. 19 2月, 2018 15 次提交
  3. 17 2月, 2018 3 次提交
  4. 16 2月, 2018 1 次提交
    • D
      m4: disable gcc8 -Wcast-function-type warnings from -Wextra · 91482930
      Daniel P. Berrangé 提交于
      The -Wextra flag bundle gained a new warning -Wcast-function-type.
      This complains if you cast between two function prototypes where
      the number of parameters or their data types are not compatible.
      Unfortunately we need such "bad" function casts for our event
      callbacks. It is possible to silence the warning by first casting
      to the generic "void (*)(void)" function prototype, but that is
      rather ugly to add throughout libvirt code.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      91482930
  5. 14 2月, 2018 13 次提交
  6. 13 2月, 2018 6 次提交