[libvirt] [PATCH] network: bridge: Don't start network if it collides with host routing

Laine Stump laine at laine.org
Fri May 21 05:23:32 UTC 2010


On 05/20/2010 07:41 PM, Cole Robinson wrote:
> Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=235961
>
> If using the default virtual network, an easy way to lose guest network
> connectivity is to install libvirt inside the VM. The autostarted
> default network inside the guest collides with host virtual network
> routing. This is a long standing issue that has caused users quite a
> bit of pain and confusion.
>
> On network startup, parse /proc/net/route

Any interest in doing this with netlink instead? (I've got this "thing" 
against parsing text files to get information if it can be retrieved via 
a nice clean API). If so, I think I can whip up the equivalent code with 
libnl calls, but probably not until later in the afternoon.

If I'm the only one who feels uneasy about parsing stuff out of /proc, 
then I'm fine with that too.

>   and compare the requested
> IP+netmask against host routing destinations: if any matches are found,
> refuse to start the network.
>    

Do we maybe want to check for any networks that would encompass existing 
host interface IP addresses, or existing route destination IPs?




More information about the libvir-list mailing list