Bug 766102 - libvirt didn't check dev value in network xml
Summary: libvirt didn't check dev value in network xml
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-10 05:22 UTC by xhu
Modified: 2016-04-27 03:21 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-23 15:08:37 UTC


Attachments (Terms of Use)

Description xhu 2011-12-10 05:22:20 UTC
Description of problem:
libvirt didn't check dev value in network xml

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 the following network xml:
# cat test.xml
<network>
<name>test</name>
<uuid>f33ccec8-b0fa-ca47-229f-0daf225b9eb7</uuid>
<forward dev='*' mode='nat'>
     <interface dev='*'/>
   </forward>
   <bridge name='test' stp='on' delay='0' />
   <mac address='52:54:00:B1:79:5F'/>
   <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 test network
# virsh net-define test.xml 
Network test defined from tmp.xml
# virsh net-start test
Network test started
3. start the guest with test network:
# virsh dumpxml rhel6
...
<interface type='network'>
      <source network='test'/>
      <model type='virtio'/>
      <driver name='qemu'/>function='0x0'/>
    </interface>
...
# virsh start rhel6  
Domain rhel6 started

Actual results:
libvirt didn't check dev value in network xml

Expected results:
libvirt should check dev value in network xml and raise error when start the network

Additional info:

Comment 2 Cole Robinson 2016-03-23 15:08:37 UTC
I'm of the opinion that if iptables doesn't error about this here, we shouldn't get in the business of trying to validate whether the forward dev is valid or not; likely to cause more issues with false positives and code maintenance than it is going to help users who make a typo


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