[PATCH] loopback is not always just lo

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

 



 On BSD family OSes (Free/Net/Open/DragonFlyBSD, Mac OS) and
 Solaris loopback interface is called 'lo0' instead of just 'lo'.

---
 src/network/bridge_driver.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index a3ee3f3..9d94d65 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -1002,7 +1002,12 @@ networkDnsmasqConfContents(virNetworkObjPtr network,
         virBufferAsprintf(&configbuf, "pid-file=%s\n", pidfile);
 
     /* dnsmasq will *always* listen on localhost unless told otherwise */
+#ifdef __linux__
     virBufferAddLit(&configbuf, "except-interface=lo\n");
+#else
+    /* BSD family OSes and Solaris call loopback interface as lo0 */
+    virBufferAddLit(&configbuf, "except-interface=lo0\n");
+#endif
 
     if (dnsmasqCapsGet(caps, DNSMASQ_CAPS_BIND_DYNAMIC)) {
         /* using --bind-dynamic with only --interface (no
-- 
2.9.2

--
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]