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

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

On 05/27/2010 03:01 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 and compare the requested
IP+netmask against host routing destinations: if any matches are found,
refuse to start the network.

v2: Drop sscanf, fix a comment typo, comment that function could use
     libnl instead of /proc

v3: Consider route netmask. Compare binary data rather than convert to

v4: Return to using sscanf, drop inet functions in favor of virSocket,
     parsing safety checks. Don't make parse failures fatal, in case
     expected format changes.

Aside from style issues, I applied this patch and it behaves as expected - blocks creation of networks that are exact matches to current routes, and allows creation of networks that are a subset or superset of an existing network.

So I'll ACK it too (not that it's necessary...)

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