Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
forward mode='bridge' macvtap xml with invalid section(bridge and ip section) can be defined and started
Version-Release number of selected component (if applicable):
libvirt-0.9.8-1.el6.x86_64
qemu-kvm-0.12.1.2-2.209.el6.x86_64
kernel-2.6.32-220.el6.x86_64
How reproducible:
everytimes
Steps to Reproduce:
1. prepare forward mode='bridge' macvtap xml with dhcp section
# cat macvtap-bridge-test.xml
<network>
<name>test</name>
<forward dev='eth0' mode='bridge'>
<interface dev='eth0'/>
<interface dev='eth3'/>
</forward>
<bridge name='test'/>
<ip address='192.168.200.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.200.2' end='192.168.200.254' />
</dhcp>
</ip>
</network>
2. define and start network test:
# virsh net-define macvtap-bridge-test.xml
Network test defined from macvtap-bridge-test.xml
# virsh net-start test
Network test started
3. check test network xml:
<network>
<name>test</name>
<uuid>518e50e7-38dc-3441-3e4c-8f9fb536fb8f</uuid>
<forward dev='eth0' mode='bridge'>
<interface dev='eth0'/>
<interface dev='eth3'/>
</forward>
<bridge name='test' />
<ip address='192.168.200.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.200.2' end='192.168.200.254' />
</dhcp>
</ip>
</network>
Actual results:
forward mode='bridge' macvtap xml with invalid section(bridge and ip section) can be defined and started
Expected results:
when the above network xml is defined, invalid xml section error should raised.
Additional info:
Pushed upstream. Will be in libvirt-1.0.1.
commit fd54f1de536ebd5f7566285b83029e6c73725d03
Author: Laine Stump <laine>
Date: Wed Dec 5 14:10:24 2012 -0500
network: prevent a few invalid configuration combinations
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=767057
It was possible to define a network with <forward mode='bridge'> that
had both a bridge device and a forward device defined. These two are
mutually exclusive by definition (if you are using a bridge device,
then this is a host bridge, and if you have a forward dev defined,
this is using macvtap). It was also possible to put <ip>, <dns>, and
<domain> elements in this definition, although those aren't supported
by the current driver (although it's conceivable that some other
driver might support that).
The items that are invalid by definition, are now checked in the XML
parser (since they will definitely *always* be wrong), and the others
are checked in networkValidate() in the network driver (since, as
mentioned, it's possible that some other network driver, or even this
one, could some day support setting those).
Verify this bug with:
libvirt-1.0.1-1.el7.x86_64
#cat net.xml
<network>
<name>test</name>
<forward dev='eth0' mode='bridge'>
<interface dev='eth0'/>
<interface dev='eth3'/>
</forward>
<bridge name='test'/>
<ip address='192.168.200.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.200.2' end='192.168.200.254' />
</dhcp>
</ip>
</network>
#virsh net-define net.xml
error: Failed to define network from net.xml
error: XML error: A network with forward mode='bridge' can specify a bridge name or a forward dev, but not both (network 'test')
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.
Description of problem: forward mode='bridge' macvtap xml with invalid section(bridge and ip section) can be defined and started Version-Release number of selected component (if applicable): libvirt-0.9.8-1.el6.x86_64 qemu-kvm-0.12.1.2-2.209.el6.x86_64 kernel-2.6.32-220.el6.x86_64 How reproducible: everytimes Steps to Reproduce: 1. prepare forward mode='bridge' macvtap xml with dhcp section # cat macvtap-bridge-test.xml <network> <name>test</name> <forward dev='eth0' mode='bridge'> <interface dev='eth0'/> <interface dev='eth3'/> </forward> <bridge name='test'/> <ip address='192.168.200.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.200.2' end='192.168.200.254' /> </dhcp> </ip> </network> 2. define and start network test: # virsh net-define macvtap-bridge-test.xml Network test defined from macvtap-bridge-test.xml # virsh net-start test Network test started 3. check test network xml: <network> <name>test</name> <uuid>518e50e7-38dc-3441-3e4c-8f9fb536fb8f</uuid> <forward dev='eth0' mode='bridge'> <interface dev='eth0'/> <interface dev='eth3'/> </forward> <bridge name='test' /> <ip address='192.168.200.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.200.2' end='192.168.200.254' /> </dhcp> </ip> </network> Actual results: forward mode='bridge' macvtap xml with invalid section(bridge and ip section) can be defined and started Expected results: when the above network xml is defined, invalid xml section error should raised. Additional info: