diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 8aef609830..10e6592308 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -2283,7 +2283,7 @@ virNetworkDNSDefFormat(virBufferPtr buf, virBufferAdjustIndent(buf, 2); for (i = 0; i < def->ntxts; i++) { - virBufferAsprintf(buf, "\n", + virBufferAsprintf(buf, "\n", def->txts[i].name, def->txts[i].value); } @@ -2362,7 +2362,7 @@ virNetworkIpDefFormat(virBufferPtr buf, virBufferAdjustIndent(buf, 2); if (def->tftproot) { - virBufferEscapeString(buf, "\n", + virBufferEscapeString(buf, "\n", def->tftproot); } if ((def->nranges || def->nhosts)) { @@ -2379,36 +2379,36 @@ virNetworkIpDefFormat(virBufferPtr buf, VIR_FREE(saddr); goto error; } - virBufferAsprintf(buf, "\n", + virBufferAsprintf(buf, "\n", saddr, eaddr); VIR_FREE(saddr); VIR_FREE(eaddr); } for (i = 0; i < def->nhosts; i++) { - virBufferAddLit(buf, "hosts[i].mac) - virBufferAsprintf(buf, "mac='%s' ", def->hosts[i].mac); + virBufferAsprintf(buf, " mac='%s'", def->hosts[i].mac); if (def->hosts[i].id) - virBufferAsprintf(buf, "id='%s' ", def->hosts[i].id); + virBufferAsprintf(buf, " id='%s'", def->hosts[i].id); if (def->hosts[i].name) - virBufferAsprintf(buf, "name='%s' ", def->hosts[i].name); + virBufferAsprintf(buf, " name='%s'", def->hosts[i].name); if (VIR_SOCKET_ADDR_VALID(&def->hosts[i].ip)) { char *ipaddr = virSocketAddrFormat(&def->hosts[i].ip); if (!ipaddr) goto error; - virBufferAsprintf(buf, "ip='%s' ", ipaddr); + virBufferAsprintf(buf, " ip='%s'", ipaddr); VIR_FREE(ipaddr); } virBufferAddLit(buf, "/>\n"); } if (def->bootfile) { - virBufferEscapeString(buf, "bootfile); if (VIR_SOCKET_ADDR_VALID(&def->bootserver)) { char *ipaddr = virSocketAddrFormat(&def->bootserver); if (!ipaddr) goto error; - virBufferEscapeString(buf, "server='%s' ", ipaddr); + virBufferEscapeString(buf, " server='%s'", ipaddr); VIR_FREE(ipaddr); } virBufferAddLit(buf, "/>\n"); @@ -2656,12 +2656,12 @@ virNetworkDefFormatInternal(virBufferPtr buf, virBufferAddLit(buf, "bridge) virBufferEscapeString(buf, " name='%s'", def->bridge); - virBufferAsprintf(buf, " stp='%s' delay='%ld' />\n", + virBufferAsprintf(buf, " stp='%s' delay='%ld'/>\n", def->stp ? "on" : "off", def->delay); } else if (def->forward.type == VIR_NETWORK_FORWARD_BRIDGE && def->bridge) { - virBufferEscapeString(buf, "\n", def->bridge); + virBufferEscapeString(buf, "\n", def->bridge); } diff --git a/src/network/default.xml b/src/network/default.xml index 9cfc01ed78..d7241d0c16 100644 --- a/src/network/default.xml +++ b/src/network/default.xml @@ -1,10 +1,10 @@ default - + - + diff --git a/src/test/test_driver.c b/src/test/test_driver.c index d7b2e40a7a..c2256188df 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -250,11 +250,11 @@ static const char *defaultNetworkXML = "" " default" " dd8fe884-6c02-601e-7551-cca97df1c5df" -" " +" " " " " " " " -" " +" " " " " " ""; diff --git a/tests/networkxml2confdata/dhcp6-nat-network.xml b/tests/networkxml2confdata/dhcp6-nat-network.xml index 4259173854..a67bde8f39 100644 --- a/tests/networkxml2confdata/dhcp6-nat-network.xml +++ b/tests/networkxml2confdata/dhcp6-nat-network.xml @@ -2,24 +2,24 @@ default 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - - - + + + - - - - - - + + + + + + diff --git a/tests/networkxml2confdata/dhcp6-network.xml b/tests/networkxml2confdata/dhcp6-network.xml index 776737e26c..ae9ff1f32c 100644 --- a/tests/networkxml2confdata/dhcp6-network.xml +++ b/tests/networkxml2confdata/dhcp6-network.xml @@ -2,16 +2,16 @@ default 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - - - - - - + + + + + + diff --git a/tests/networkxml2confdata/dhcp6host-routed-network.xml b/tests/networkxml2confdata/dhcp6host-routed-network.xml index 2693d872fc..42b9d3f16a 100644 --- a/tests/networkxml2confdata/dhcp6host-routed-network.xml +++ b/tests/networkxml2confdata/dhcp6host-routed-network.xml @@ -2,21 +2,21 @@ local 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - - + + - - - - - + + + + + diff --git a/tests/networkxml2confdata/isolated-network.xml b/tests/networkxml2confdata/isolated-network.xml index cc320a9d22..b22d4ea775 100644 --- a/tests/networkxml2confdata/isolated-network.xml +++ b/tests/networkxml2confdata/isolated-network.xml @@ -1,11 +1,11 @@ private 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - + diff --git a/tests/networkxml2confdata/nat-network-dns-hosts.xml b/tests/networkxml2confdata/nat-network-dns-hosts.xml index 351df4fb57..9add45656a 100644 --- a/tests/networkxml2confdata/nat-network-dns-hosts.xml +++ b/tests/networkxml2confdata/nat-network-dns-hosts.xml @@ -2,7 +2,7 @@ default 81ff0d90-c91e-6742-64da-4a736edb9a9c - + diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.xml b/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.xml index f6f24e1208..13b1c247d5 100644 --- a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.xml +++ b/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.xml @@ -4,15 +4,15 @@ - + - + - - - + + + diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record.xml b/tests/networkxml2confdata/nat-network-dns-srv-record.xml index 4be85b50a0..3dd19e6698 100644 --- a/tests/networkxml2confdata/nat-network-dns-srv-record.xml +++ b/tests/networkxml2confdata/nat-network-dns-srv-record.xml @@ -4,15 +4,15 @@ - + - + - - - + + + diff --git a/tests/networkxml2confdata/nat-network-dns-txt-record.xml b/tests/networkxml2confdata/nat-network-dns-txt-record.xml index bd1697608c..0a6bd595ae 100644 --- a/tests/networkxml2confdata/nat-network-dns-txt-record.xml +++ b/tests/networkxml2confdata/nat-network-dns-txt-record.xml @@ -2,15 +2,15 @@ default 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - + - - - + + + diff --git a/tests/networkxml2confdata/nat-network.xml b/tests/networkxml2confdata/nat-network.xml index eb71d9ea38..e44d35d83d 100644 --- a/tests/networkxml2confdata/nat-network.xml +++ b/tests/networkxml2confdata/nat-network.xml @@ -2,12 +2,12 @@ default 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - - - + + + diff --git a/tests/networkxml2confdata/netboot-network.xml b/tests/networkxml2confdata/netboot-network.xml index b8a4d996fb..8d5ad31a00 100644 --- a/tests/networkxml2confdata/netboot-network.xml +++ b/tests/networkxml2confdata/netboot-network.xml @@ -2,13 +2,13 @@ netboot 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - + - - + + diff --git a/tests/networkxml2confdata/netboot-proxy-network.xml b/tests/networkxml2confdata/netboot-proxy-network.xml index e11c50b3ee..a5b7c1e4e6 100644 --- a/tests/networkxml2confdata/netboot-proxy-network.xml +++ b/tests/networkxml2confdata/netboot-proxy-network.xml @@ -2,12 +2,12 @@ netboot 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - - + + diff --git a/tests/networkxml2confdata/routed-network.xml b/tests/networkxml2confdata/routed-network.xml index 3aa810929f..6b0853a0b4 100644 --- a/tests/networkxml2confdata/routed-network.xml +++ b/tests/networkxml2confdata/routed-network.xml @@ -2,7 +2,7 @@ local 81ff0d90-c91e-6742-64da-4a736edb9a9b - + diff --git a/tests/networkxml2xmlin/bandwidth-network.xml b/tests/networkxml2xmlin/bandwidth-network.xml index 555ee18662..5164a1e2c8 100644 --- a/tests/networkxml2xmlin/bandwidth-network.xml +++ b/tests/networkxml2xmlin/bandwidth-network.xml @@ -2,7 +2,7 @@ test-net 986fed9e-a488-186d-ef2d-17ebfd1993f8 - + @@ -10,7 +10,7 @@ - + diff --git a/tests/networkxml2xmlin/dhcp6host-routed-network.xml b/tests/networkxml2xmlin/dhcp6host-routed-network.xml index 40f6dfe90f..59f89e49b5 100644 --- a/tests/networkxml2xmlin/dhcp6host-routed-network.xml +++ b/tests/networkxml2xmlin/dhcp6host-routed-network.xml @@ -2,21 +2,21 @@ local 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - - + + - - - - - + + + + + diff --git a/tests/networkxml2xmlin/empty-allow-ipv6.xml b/tests/networkxml2xmlin/empty-allow-ipv6.xml index 9d1e4e4462..78abfa34fd 100644 --- a/tests/networkxml2xmlin/empty-allow-ipv6.xml +++ b/tests/networkxml2xmlin/empty-allow-ipv6.xml @@ -1,6 +1,6 @@ empty 81ff0d90-c91e-6742-64da-4a736edb9a9c - + diff --git a/tests/networkxml2xmlin/isolated-network.xml b/tests/networkxml2xmlin/isolated-network.xml index 5aa88c1274..0c51c64a57 100644 --- a/tests/networkxml2xmlin/isolated-network.xml +++ b/tests/networkxml2xmlin/isolated-network.xml @@ -1,11 +1,11 @@ private 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - + diff --git a/tests/networkxml2xmlin/nat-network-dns-hosts.xml b/tests/networkxml2xmlin/nat-network-dns-hosts.xml index 954c9dbc9e..da65267ec5 100644 --- a/tests/networkxml2xmlin/nat-network-dns-hosts.xml +++ b/tests/networkxml2xmlin/nat-network-dns-hosts.xml @@ -2,7 +2,7 @@ default 81ff0d90-c91e-6742-64da-4a736edb9a9c - + host diff --git a/tests/networkxml2xmlin/nat-network-dns-srv-record-minimal.xml b/tests/networkxml2xmlin/nat-network-dns-srv-record-minimal.xml index e9b7680603..a18afae2fd 100644 --- a/tests/networkxml2xmlin/nat-network-dns-srv-record-minimal.xml +++ b/tests/networkxml2xmlin/nat-network-dns-srv-record-minimal.xml @@ -4,15 +4,15 @@ - + - + - - - + + + diff --git a/tests/networkxml2xmlin/nat-network-dns-srv-record.xml b/tests/networkxml2xmlin/nat-network-dns-srv-record.xml index 4be85b50a0..3dd19e6698 100644 --- a/tests/networkxml2xmlin/nat-network-dns-srv-record.xml +++ b/tests/networkxml2xmlin/nat-network-dns-srv-record.xml @@ -4,15 +4,15 @@ - + - + - - - + + + diff --git a/tests/networkxml2xmlin/nat-network-dns-txt-record.xml b/tests/networkxml2xmlin/nat-network-dns-txt-record.xml index bd1697608c..0a6bd595ae 100644 --- a/tests/networkxml2xmlin/nat-network-dns-txt-record.xml +++ b/tests/networkxml2xmlin/nat-network-dns-txt-record.xml @@ -2,15 +2,15 @@ default 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - + - - - + + + diff --git a/tests/networkxml2xmlin/nat-network.xml b/tests/networkxml2xmlin/nat-network.xml index 23f7fcb1b2..4fdde7950f 100644 --- a/tests/networkxml2xmlin/nat-network.xml +++ b/tests/networkxml2xmlin/nat-network.xml @@ -1,13 +1,13 @@ default 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - - - + + + diff --git a/tests/networkxml2xmlin/netboot-network.xml b/tests/networkxml2xmlin/netboot-network.xml index ed75663053..0db79e3bef 100644 --- a/tests/networkxml2xmlin/netboot-network.xml +++ b/tests/networkxml2xmlin/netboot-network.xml @@ -5,10 +5,10 @@ - + - - + + diff --git a/tests/networkxml2xmlin/netboot-proxy-network.xml b/tests/networkxml2xmlin/netboot-proxy-network.xml index ecb6738694..0f02ceee7c 100644 --- a/tests/networkxml2xmlin/netboot-proxy-network.xml +++ b/tests/networkxml2xmlin/netboot-proxy-network.xml @@ -6,8 +6,8 @@ - - + + diff --git a/tests/networkxml2xmlin/routed-network.xml b/tests/networkxml2xmlin/routed-network.xml index 61d73c0b86..ab5e15b1f6 100644 --- a/tests/networkxml2xmlin/routed-network.xml +++ b/tests/networkxml2xmlin/routed-network.xml @@ -1,7 +1,7 @@ local 81ff0d90-c91e-6742-64da-4a736edb9a9b - + diff --git a/tests/networkxml2xmlout/bandwidth-network.xml b/tests/networkxml2xmlout/bandwidth-network.xml index c0c8ac3882..7294ae1a10 100644 --- a/tests/networkxml2xmlout/bandwidth-network.xml +++ b/tests/networkxml2xmlout/bandwidth-network.xml @@ -2,7 +2,7 @@ test-net 986fed9e-a488-186d-ef2d-17ebfd1993f8 - + @@ -10,7 +10,7 @@ - + diff --git a/tests/networkxml2xmlout/dhcp6host-routed-network.xml b/tests/networkxml2xmlout/dhcp6host-routed-network.xml index fc8666b258..b275afa001 100644 --- a/tests/networkxml2xmlout/dhcp6host-routed-network.xml +++ b/tests/networkxml2xmlout/dhcp6host-routed-network.xml @@ -4,21 +4,21 @@ - + - - + + - - - - - + + + + + diff --git a/tests/networkxml2xmlout/empty-allow-ipv6.xml b/tests/networkxml2xmlout/empty-allow-ipv6.xml index 53e4fa7f8a..f355285273 100644 --- a/tests/networkxml2xmlout/empty-allow-ipv6.xml +++ b/tests/networkxml2xmlout/empty-allow-ipv6.xml @@ -1,6 +1,6 @@ empty 81ff0d90-c91e-6742-64da-4a736edb9a9c - + diff --git a/tests/networkxml2xmlout/host-bridge-net.xml b/tests/networkxml2xmlout/host-bridge-net.xml index 84992a923e..c76d64a5d6 100644 --- a/tests/networkxml2xmlout/host-bridge-net.xml +++ b/tests/networkxml2xmlout/host-bridge-net.xml @@ -2,5 +2,5 @@ host-bridge-net 81ff0d90-c91e-6742-64da-4a736edb9a8e - + diff --git a/tests/networkxml2xmlout/isolated-network.xml b/tests/networkxml2xmlout/isolated-network.xml index 9ff1f55d66..e2c62834bd 100644 --- a/tests/networkxml2xmlout/isolated-network.xml +++ b/tests/networkxml2xmlout/isolated-network.xml @@ -1,11 +1,11 @@ private 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - + diff --git a/tests/networkxml2xmlout/nat-network-dns-forward-plain.xml b/tests/networkxml2xmlout/nat-network-dns-forward-plain.xml index 3b50828ae1..7522f6ae1c 100644 --- a/tests/networkxml2xmlout/nat-network-dns-forward-plain.xml +++ b/tests/networkxml2xmlout/nat-network-dns-forward-plain.xml @@ -4,7 +4,7 @@ - + diff --git a/tests/networkxml2xmlout/nat-network-dns-hosts.xml b/tests/networkxml2xmlout/nat-network-dns-hosts.xml index b26fa03be1..a2f46da8c1 100644 --- a/tests/networkxml2xmlout/nat-network-dns-hosts.xml +++ b/tests/networkxml2xmlout/nat-network-dns-hosts.xml @@ -4,7 +4,7 @@ - + host diff --git a/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml b/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml index e9b7680603..a18afae2fd 100644 --- a/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml +++ b/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml @@ -4,15 +4,15 @@ - + - + - - - + + + diff --git a/tests/networkxml2xmlout/nat-network-dns-srv-record.xml b/tests/networkxml2xmlout/nat-network-dns-srv-record.xml index 4be85b50a0..3dd19e6698 100644 --- a/tests/networkxml2xmlout/nat-network-dns-srv-record.xml +++ b/tests/networkxml2xmlout/nat-network-dns-srv-record.xml @@ -4,15 +4,15 @@ - + - + - - - + + + diff --git a/tests/networkxml2xmlout/nat-network-dns-txt-record.xml b/tests/networkxml2xmlout/nat-network-dns-txt-record.xml index f767f486b4..a4590119ef 100644 --- a/tests/networkxml2xmlout/nat-network-dns-txt-record.xml +++ b/tests/networkxml2xmlout/nat-network-dns-txt-record.xml @@ -4,15 +4,15 @@ - + - + - - - + + + diff --git a/tests/networkxml2xmlout/nat-network.xml b/tests/networkxml2xmlout/nat-network.xml index 02d68495c2..93bc7db51d 100644 --- a/tests/networkxml2xmlout/nat-network.xml +++ b/tests/networkxml2xmlout/nat-network.xml @@ -4,12 +4,12 @@ - + - - - + + + diff --git a/tests/networkxml2xmlout/netboot-network.xml b/tests/networkxml2xmlout/netboot-network.xml index b8a4d996fb..8d5ad31a00 100644 --- a/tests/networkxml2xmlout/netboot-network.xml +++ b/tests/networkxml2xmlout/netboot-network.xml @@ -2,13 +2,13 @@ netboot 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - + - - + + diff --git a/tests/networkxml2xmlout/netboot-proxy-network.xml b/tests/networkxml2xmlout/netboot-proxy-network.xml index e11c50b3ee..a5b7c1e4e6 100644 --- a/tests/networkxml2xmlout/netboot-proxy-network.xml +++ b/tests/networkxml2xmlout/netboot-proxy-network.xml @@ -2,12 +2,12 @@ netboot 81ff0d90-c91e-6742-64da-4a736edb9a9b - + - - + + diff --git a/tests/networkxml2xmlout/routed-network.xml b/tests/networkxml2xmlout/routed-network.xml index cb81bae8a5..81abf06e9f 100644 --- a/tests/networkxml2xmlout/routed-network.xml +++ b/tests/networkxml2xmlout/routed-network.xml @@ -4,7 +4,7 @@ - + diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c index 11b3f02228..dbf12b0ef7 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxml2xmltest.c @@ -103,6 +103,8 @@ mymain(void) DO_TEST("netboot-network"); DO_TEST("netboot-proxy-network"); DO_TEST("nat-network-dns-txt-record"); + DO_TEST("nat-network-dns-srv-record"); + DO_TEST("nat-network-dns-srv-record-minimal"); DO_TEST("nat-network-dns-hosts"); DO_TEST("nat-network-dns-forward-plain"); DO_TEST("8021Qbh-net");