Bug 511244 - libvirt should error if virtual network uses same address range as host
libvirt should error if virtual network uses same address range as host
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Michal Privoznik
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-14 08:32 EDT by Mark Xie
Modified: 2013-06-18 09:17 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-18 09:17:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mark Xie 2009-07-14 08:32:00 EDT
Description of problem:
When adding a new network by virt-manager, there will be a warning when an unsuitable network specified, but it will failed to give out warning sometimes.
This maybe not a bug, but an advice of feature improvement, I'm not very sure.

Version-Release number of selected component (if applicable):
virt-manager-0.6.1-6.el5

How reproducible:
100%

Steps to Reproduce:
1. Launch virt-manager
2. Open "Host Details" window by "Edit --> Host Details", go to page of "Virtual Networks"
3. Add a new network follow the wizard, specify the same Network of the host machine on page of "Choosing an IPv4 address space". For example, the host network is "10.66.70.0/24", then specify "10.66.70.0/24" here.

Actual results:
There is none warning at step 3, but in fact, the guest should not have a same network with the host when using NAT.


Expected results:
It will be better if the background of the input field change color to remind end users.


Additional info:
Comment 1 Cole Robinson 2009-10-19 11:22:34 EDT
Not entirely sure how easy this will be. Need to investigate.
Comment 2 Daniel Berrange 2009-10-19 11:29:05 EDT
This check should probably be done in the libvirt layer, I'd say it should refuse to start any virtual network which has an IP range that clashes with any current host interface.  Obviously this won't help if the host interface gets a clashing IP addr after the virtual network starts, but that's not so immediately critical as breaking existing host networking.
Comment 6 RHEL Product and Program Management 2010-08-09 14:30:08 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 7 RHEL Product and Program Management 2010-08-20 06:07:08 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 8 Cole Robinson 2011-03-10 10:41:10 EST
Reassigning to libvirt per comment #2
Comment 11 RHEL Product and Program Management 2013-05-01 02:42:57 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 12 Michal Privoznik 2013-06-18 09:17:55 EDT
The patch is pushed upstream for quite a while now:

commit a83fe2c23efad190a1e00e448f607fe032650fd6
Author:     Cole Robinson <crobinso@redhat.com>
AuthorDate: Thu May 20 19:31:16 2010 -0400
Commit:     Cole Robinson <crobinso@redhat.com>
CommitDate: Thu May 27 18:02:53 2010 -0400

    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

v0.8.1-199-ga83fe2c

It's part of 0.8.2 release which is part of RHEL-5.10. Hence I'm closing this one as CURRENTRELEASE.

Note You need to log in before you can comment on or make changes to this bug.