[PATCH 2/3] v6-6: add dnsmasq interface= parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch adds the interface= dnsmasq parameter to the dnsmasq
conf-file.  The relavant tests are updated.
---
 src/network/bridge_driver.c                                    | 10 ++--------
 tests/networkxml2argvdata/isolated-network.argv                |  1 +
 tests/networkxml2argvdata/nat-network-dns-hosts.argv           |  1 +
 .../nat-network-dns-srv-record-minimal.argv                    |  1 +
 tests/networkxml2argvdata/nat-network-dns-srv-record.argv      |  1 +
 tests/networkxml2argvdata/nat-network-dns-txt-record.argv      |  1 +
 tests/networkxml2argvdata/nat-network.argv                     |  1 +
 tests/networkxml2argvdata/netboot-network.argv                 |  1 +
 tests/networkxml2argvdata/netboot-proxy-network.argv           |  1 +
 tests/networkxml2argvdata/routed-network.argv                  |  1 +
 10 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 508de3a..236d8f8 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -751,14 +751,8 @@ networkDnsmasqConfContents(virNetworkObjPtr network,
         }
     }
 
-    /*
-     * --interface does not actually work with dnsmasq < 2.47,
-     * due to DAD for ipv6 addresses on the interface.
-     *
-     * virCommandAddArgList(cmd, "--interface", ipdef->bridge, NULL);
-     *
-     * So listen on all defined IPv[46] addresses
-     */
+    virBufferAsprintf(&configbuf, "interface=%s\n", network->def->bridge);
+
     for (ii = 0;
          (tmpipdef = virNetworkDefGetIpByIndex(network->def, AF_UNSPEC, ii));
          ii++)
diff --git a/tests/networkxml2argvdata/isolated-network.argv b/tests/networkxml2argvdata/isolated-network.argv
index 042158b..abcde93 100644
--- a/tests/networkxml2argvdata/isolated-network.argv
+++ b/tests/networkxml2argvdata/isolated-network.argv
@@ -6,6 +6,7 @@ domain-needed
 local=//
 dhcp-option=3
 no-resolv
+interface=virbr2
 listen-address=192.168.152.1
 dhcp-range=192.168.152.2,192.168.152.254
 dhcp-leasefile=/var/lib/libvirt/dnsmasq/private.leases
diff --git a/tests/networkxml2argvdata/nat-network-dns-hosts.argv b/tests/networkxml2argvdata/nat-network-dns-hosts.argv
index 91eb682..7dce6f9 100644
--- a/tests/networkxml2argvdata/nat-network-dns-hosts.argv
+++ b/tests/networkxml2argvdata/nat-network-dns-hosts.argv
@@ -6,5 +6,6 @@ domain-needed
 local=/example.com/
 domain=example.com
 expand-hosts
+interface=virbr0
 listen-address=192.168.122.1
 addn-hosts=/var/lib/libvirt/dnsmasq/default.addnhosts
diff --git a/tests/networkxml2argvdata/nat-network-dns-srv-record-minimal.argv b/tests/networkxml2argvdata/nat-network-dns-srv-record-minimal.argv
index d92497b..d87d438 100644
--- a/tests/networkxml2argvdata/nat-network-dns-srv-record-minimal.argv
+++ b/tests/networkxml2argvdata/nat-network-dns-srv-record-minimal.argv
@@ -5,6 +5,7 @@ except-interface=lo
 domain-needed
 local=//
 srv-host=name.tcp.,,,,
+interface=virbr0
 listen-address=192.168.122.1
 listen-address=192.168.123.1
 listen-address=2001:db8:ac10:fe01::1
diff --git a/tests/networkxml2argvdata/nat-network-dns-srv-record.argv b/tests/networkxml2argvdata/nat-network-dns-srv-record.argv
index d8846c2..53882fe 100644
--- a/tests/networkxml2argvdata/nat-network-dns-srv-record.argv
+++ b/tests/networkxml2argvdata/nat-network-dns-srv-record.argv
@@ -5,6 +5,7 @@ except-interface=lo
 domain-needed
 local=//
 srv-host=name.tcp.test-domain-name,.,1024,10,10
+interface=virbr0
 listen-address=192.168.122.1
 listen-address=192.168.123.1
 listen-address=2001:db8:ac10:fe01::1
diff --git a/tests/networkxml2argvdata/nat-network-dns-txt-record.argv b/tests/networkxml2argvdata/nat-network-dns-txt-record.argv
index bf00513..cc3ed28 100644
--- a/tests/networkxml2argvdata/nat-network-dns-txt-record.argv
+++ b/tests/networkxml2argvdata/nat-network-dns-txt-record.argv
@@ -5,6 +5,7 @@ except-interface=lo
 domain-needed
 local=//
 txt-record=example,example value
+interface=virbr0
 listen-address=192.168.122.1
 listen-address=192.168.123.1
 listen-address=2001:db8:ac10:fe01::1
diff --git a/tests/networkxml2argvdata/nat-network.argv b/tests/networkxml2argvdata/nat-network.argv
index d542bbc..431fffb 100644
--- a/tests/networkxml2argvdata/nat-network.argv
+++ b/tests/networkxml2argvdata/nat-network.argv
@@ -4,6 +4,7 @@ bind-interfaces
 except-interface=lo
 domain-needed
 local=//
+interface=virbr0
 listen-address=192.168.122.1
 listen-address=192.168.123.1
 listen-address=2001:db8:ac10:fe01::1
diff --git a/tests/networkxml2argvdata/netboot-network.argv b/tests/networkxml2argvdata/netboot-network.argv
index 4f5fedd..8405095 100644
--- a/tests/networkxml2argvdata/netboot-network.argv
+++ b/tests/networkxml2argvdata/netboot-network.argv
@@ -6,6 +6,7 @@ domain-needed
 local=/example.com/
 domain=example.com
 expand-hosts
+interface=virbr1
 listen-address=192.168.122.1
 dhcp-range=192.168.122.2,192.168.122.254
 dhcp-leasefile=/var/lib/libvirt/dnsmasq/netboot.leases
diff --git a/tests/networkxml2argvdata/netboot-proxy-network.argv b/tests/networkxml2argvdata/netboot-proxy-network.argv
index 8b9c03a..d7c8966 100644
--- a/tests/networkxml2argvdata/netboot-proxy-network.argv
+++ b/tests/networkxml2argvdata/netboot-proxy-network.argv
@@ -6,6 +6,7 @@ domain-needed
 local=/example.com/
 domain=example.com
 expand-hosts
+interface=virbr1
 listen-address=192.168.122.1
 dhcp-range=192.168.122.2,192.168.122.254
 dhcp-leasefile=/var/lib/libvirt/dnsmasq/netboot.leases
diff --git a/tests/networkxml2argvdata/routed-network.argv b/tests/networkxml2argvdata/routed-network.argv
index ad9e121..771240f 100644
--- a/tests/networkxml2argvdata/routed-network.argv
+++ b/tests/networkxml2argvdata/routed-network.argv
@@ -4,5 +4,6 @@ bind-interfaces
 except-interface=lo
 domain-needed
 local=//
+interface=virbr1
 listen-address=192.168.122.1
 addn-hosts=/var/lib/libvirt/dnsmasq/local.addnhosts
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]