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 981107 - nwfilter-edit should give error when modify the value to inadmissibility
Summary: nwfilter-edit should give error when modify the value to inadmissibility
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
medium
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-04 03:26 UTC by EricLee
Modified: 2016-04-26 13:28 UTC (History)
7 users (show)

Fixed In Version: libvirt-1.2.8-16.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 981106
Environment:
Last Closed: 2015-11-19 05:43:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description EricLee 2013-07-04 03:26:43 UTC
+++ This bug was initially created as a clone of Bug #981106 +++

Description
nwfilter-edit should give error when modify the value to inadmissibility, not return successfully as delete the line which including inadmissible value.

Version:
libvirt-0.10.2-18.el6_4.9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. # vim disallow-arp.xml
<filter name='disallow-arp' chain='arp'>
  <rule action='drop' direction='inout' priority='500'/>
</filter>

2. # virsh nwfilter-define disallow-arp.xml
Network filter disallow-arp defined from disallow-arp.xml

3. # virsh nwfilter-dumpxml disallow-arp
<filter name='disallow-arp' chain='arp' priority='-500'>
  <uuid>2f737f78-779c-4b2c-b223-b67b90765afb</uuid>
  <rule action='drop' direction='inout' priority='500'/>
</filter>

4. Use nwfilter-edit "rule action='drop'" to “rule action='dropaaa'” and save:
# virsh nwfilter-edit disallow-arp
Network filter disallow-arp XML configuration edited.

5. the rule line will disappear:
# virsh nwfilter-dumpxml disallow-arp
<filter name='disallow-arp' chain='arp' priority='-500'>
  <uuid>e088d644-6e76-4827-a7ea-ba1ea924dd1c</uuid>
</filter>

6. Also for nwfilter-define works like that.

Actual results:
As description.

Expected results:
nwfilter-edit should give error when modify the value to inadmissibility, not return successfully as delete the line which including inadmissible value.
It should judge 'rule action' only support 'drop',' reject','accept','return','continue' and "direction" only support 'in','out' and 'inout' and give error info but just delete the rule if there are not those value.

Additional info:
For nwfilter-define, if there is some inadmissible value like "dropaaa" in xml, define will succeed, but there is no <rule> element in that nwfilter. Also need to fix.

Comment 8 Shanzhi Yu 2015-07-21 08:59:58 UTC
Verify this bug with libvirt-1.2.17-2.el7.x86_64
When try to modify rule action with an invalid value, libvirt will post below error: 

# virsh nwfilter-edit disallow-arp
error: unsupported configuration: unknown rule action attribute value
Failed. Try again? [y,n,f,?]:

Comment 10 errata-xmlrpc 2015-11-19 05:43:24 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/RHBA-2015-2202.html


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