[libvirt] [PATCH] loopback is not always just lo

Roman Bogorodskiy bogorodskiy at gmail.com
Sun Nov 6 06:54:01 UTC 2016


  Daniel P. Berrange wrote:

> On Tue, Nov 01, 2016 at 06:15:59PM +0300, Pavel Timofeev wrote:
> >  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
> 
> ACK will push shortly.

This breaks all the networkxml2conftest tests, for example:

$ VIR_TEST_DEBUG=1 VIR_TEST_RANGE=1 ./tests/networkxml2conftest
TEST: networkxml2conftest
 1) Network XML-2-Conf isolated-network                               ... 
In '/home/novel/code/libvirt/tests/networkxml2confdata/isolated-network.conf':
Offset 303
Expect [
]
Actual [0
]
    
$

> Regards,
> Daniel
> -- 
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|
> 
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161106/d635b720/attachment-0001.sig>


More information about the libvir-list mailing list