libvirt/src/network
Cole Robinson a83fe2c23e network: bridge: Don't start network if it collides with host routing
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.

v5: Try and continue if we receive unexpected. Delimit parsed lines to
    prevent scanning past newline
2010-05-27 18:02:53 -04:00
..
bridge_driver.c network: bridge: Don't start network if it collides with host routing 2010-05-27 18:02:53 -04:00
bridge_driver.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
default.xml Move config files to align with driver sources 2009-09-21 14:41:45 +01:00