diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index a3ee3f364e..9d94d65b4e 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