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.
Bug 1071095 - Libvirt report incorrect error message when parsing invalid value of CTRL_IP_LEARNING in nwfilter
Summary: Libvirt report incorrect error message when parsing invalid value of CTRL_IP_...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-28 05:22 UTC by Hu Jianwei
Modified: 2015-03-05 07:30 UTC (History)
6 users (show)

Fixed In Version: libvirt-1.2.7-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 07:30:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description Hu Jianwei 2014-02-28 05:22:01 UTC
Description of problem:
Libvirt report incorrect error message when parsing invalid value of CTRL_IP_LEARNING in nwfilter

Version-Release number of selected component (if applicable):
libvirt-1.1.1-25.el7.x86_64
qemu-kvm-rhev-1.5.3-50.el7.x86_64
kernel-3.10.0-97.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Set invalid value to CTRL_IP_LEARNING, Valid values are any, dhcp, or none.
[root@intel-e5530-8-2 ~]# virsh dumpxml r7 | grep interface -A8
    <interface type='network'>
      <mac address='52:54:00:7f:44:cb'/>
      <source network='default'/>
      <model type='rtl8139'/>
      <filterref filter='clean-traffic'>
        <parameter name='CTRL_IP_LEARNING' value='jiahu'/>                
      </filterref>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
...

2. Start the domain.
[root@intel-e5530-8-2 ~]# virsh start r7
error: Failed to start domain r7
error: internal error: Could not find value for variable 'IP'

Actual results:
As shown above, after checking the codes, lack of "goto err_exit;" after the "virReportError" sentence in virNWFilterInstantiate function in nwfilter/nwfilter_gentech_driver.c

 710             } else {
 711                 rc = -1;
 712                 virReportError(VIR_ERR_PARSE_FAILED,
 713                                _("filter '%s' "
 714                                  "learning value '%s' invalid."),
 715                                filter->name, learning);
 716             }
 717         } else

Expected results:
Rebuild libvirt with "goto err_exit;" line after src/nwfilter/nwfilter_gentech_driver.c:715, below message is expected results.

[root@intel-3323-24-1 src]# rpm -q libvirt
libvirt-1.1.1-25.el7_jiahu_testing.x86_64
[root@intel-3323-24-1 src]#
[root@intel-3323-24-1 src]# virsh dumpxml mig1| grep interface -A8
    <interface type='network'>
      <mac address='52:54:00:b7:e7:d8'/>
      <source network='default'/>
      <model type='rtl8139'/>
      <filterref filter='clean-traffic'>
        <parameter name='CTRL_IP_LEARNING' value='jiahu'/>
      </filterref>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
...

[root@intel-3323-24-1 src]# virsh start mig1
error: Failed to start domain mig1
error: failed to parse configuration file filter 'clean-traffic' learning value 'jiahu' invalid.

Comment 1 Stefan Berger 2014-03-12 14:40:45 UTC
A patch for this has been pushed to the upstream repo:

commit 41064facd48676bb311784f29619c1fbd0aed8c4
Author: Stefan Berger <stefanb.ibm.com>
Date:   Wed Mar 12 10:35:13 2014 -0400

    nwfilter: Add missing goto err_exit in error path

    https://bugzilla.redhat.com/show_bug.cgi?id=1071095

    Add a missing goto err_exit in the error path where an unsupported
    value is assigned to the CTRL_IP_LEARNING key.

    Signed-off-by: Stefan Berger <stefanb.ibm.com>

Comment 3 Hu Jianwei 2014-11-24 10:52:09 UTC
Verified the bug as below:

[root@ibm-x3850x5-06 ~]# rpm -q libvirt
libvirt-1.2.8-7.el7.x86_64

[root@ibm-x3850x5-06 ~]# virsh dumpxml r7 | grep /interface -B8
    <interface type='network'>
      <mac address='02:54:00:36:c6:d0'/>
      <source network='default'/>
      <model type='virtio'/>
      <filterref filter='clean-traffic'>
        <parameter name='CTRL_IP_LEARNING' value='jiahu'/>
      </filterref>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

[root@ibm-x3850x5-06 ~]# virsh start r7
error: Failed to start domain r7
error: failed to parse configuration file filter 'clean-traffic' learning value 'jiahu' invalid.

We can get expected results, changed to Verified.

Comment 5 errata-xmlrpc 2015-03-05 07:30:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0323.html


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