[libvirt] [PATCH v4] network: bridge: Don't start network if it collides with host routing
Laine Stump
laine at laine.org
Thu May 27 20:40:19 UTC 2010
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
> string.
>
> 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...)
More information about the libvir-list
mailing list