]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: net: Correctly switch how to format address fields
authorPeter Krempa <pkrempa@redhat.com>
Thu, 21 Aug 2014 09:06:37 +0000 (11:06 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 21 Aug 2014 13:55:07 +0000 (15:55 +0200)
commit4cf1c3fab138462fc9c014aee853fa17f278c5df
tree752c5e956c3701dc7eddadee9e8eece88d0f1f53
parentb2e87c3628406aa18b383109f440e3322f3e0d6f
conf: net: Correctly switch how to format address fields

When formatting the forward mode addresses or interfaces the switch was
done based on the type of the network rather than of the type of the
individual <interface>/<address> element. In case a user would specify
an incorrect network type ("passhtrough") with <address> elements,
libvirtd would crash as it would attempt to format an <interface>.

Use the type of the individual element to format the XML.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1132347
src/conf/network_conf.c
tests/networkxml2xmlin/passthrough-address-crash.xml [new file with mode: 0644]
tests/networkxml2xmlout/passthrough-address-crash.xml [new file with mode: 0644]
tests/networkxml2xmltest.c