diff options
author | Shivaprasad G Bhat <shivaprasadbhat@gmail.com> | 2015-06-01 13:40:04 +0530 |
---|---|---|
committer | Laine Stump <laine@laine.org> | 2015-06-09 13:56:00 -0400 |
commit | 310c98d0c423a151719b47a85f1ad6e123b00db7 (patch) | |
tree | 3ecf7bab8232344a536d1961640705fd6410abb6 /tests/networkxml2confdata | |
parent | 6a28687b6ebaf6b4894b28db843182575c02a04e (diff) | |
download | libvirt-310c98d0c423a151719b47a85f1ad6e123b00db7.tar.gz |
network: escape quotes for dsmasq conf contents
dnsmasq conf file contents needs to have quotes escaped for it to
work. Because of this, the network-create/start for a network with
quotes in the name fails. The patch escapes strings for the entries
that go into the conf file.
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
Diffstat (limited to 'tests/networkxml2confdata')
-rw-r--r-- | tests/networkxml2confdata/nat-network-name-with-quotes.conf | 20 | ||||
-rw-r--r-- | tests/networkxml2confdata/nat-network-name-with-quotes.xml | 26 |
2 files changed, 46 insertions, 0 deletions
diff --git a/tests/networkxml2confdata/nat-network-name-with-quotes.conf b/tests/networkxml2confdata/nat-network-name-with-quotes.conf new file mode 100644 index 0000000000..a1c839e74a --- /dev/null +++ b/tests/networkxml2confdata/nat-network-name-with-quotes.conf @@ -0,0 +1,20 @@ +##WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE +##OVERWRITTEN AND LOST. Changes to this configuration should be made using: +## virsh net-edit default"with"quotes" +## or other application using the libvirt API. +## +## dnsmasq conf file created by libvirt +strict-order +except-interface=lo +bind-interfaces +listen-address=192.168.122.1 +listen-address=192.168.123.1 +listen-address=fc00:db8:ac10:fe01::1 +listen-address=fc00:db8:ac10:fd01::1 +listen-address=10.24.10.1 +srv-host=_name._tcp +dhcp-range=192.168.122.2,192.168.122.254 +dhcp-no-override +dhcp-lease-max=253 +dhcp-hostsfile=/var/lib/libvirt/dnsmasq/default"with"quotes".hostsfile +addn-hosts=/var/lib/libvirt/dnsmasq/default"with"quotes".addnhosts diff --git a/tests/networkxml2confdata/nat-network-name-with-quotes.xml b/tests/networkxml2confdata/nat-network-name-with-quotes.xml new file mode 100644 index 0000000000..eba75d2e2d --- /dev/null +++ b/tests/networkxml2confdata/nat-network-name-with-quotes.xml @@ -0,0 +1,26 @@ +<network> + <name>default"with"quotes"</name> + <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid> + <forward dev='eth1' mode='nat'> + <interface dev='eth1'/> + </forward> + <bridge name='virbr0' stp='on' delay='0'/> + <dns> + <srv service='name' protocol='tcp'/> + </dns> + <ip address='192.168.122.1' netmask='255.255.255.0'> + <dhcp> + <range start='192.168.122.2' end='192.168.122.254'/> + <host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/> + <host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/> + </dhcp> + </ip> + <ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'> + </ip> + <ip family='ipv6' address='fc00:db8:ac10:fe01::1' prefix='64'> + </ip> + <ip family='ipv6' address='fc00:db8:ac10:fd01::1' prefix='64'> + </ip> + <ip family='ipv4' address='10.24.10.1'> + </ip> +</network> |