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 1125764 - libvirt should check stp delay time
Summary: libvirt should check stp delay time
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: Erik Skultety
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-01 03:07 UTC by Luyao Huang
Modified: 2015-11-19 05:46 UTC (History)
6 users (show)

Fixed In Version: libvirt-1.2.13-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 05:46:34 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 Luyao Huang 2014-08-01 03:07:30 UTC
description of problem:
libvirt should check stp delay time.When you set a large number or a negative number to it,it will start success and can use dumpxml see it.

Version-Release number of selected component (if applicable):
libvirt-1.1.1-29.el7_0.1.x86_64


How reproducible:
100%

Steps to Reproduce:
1.prepare xml like this
# cat net.xml
<network>
  <name>net4</name>
  <uuid>d918f9ff-f9b2-4ab7-ae01-f1042cd303a6</uuid>
  <forward mode='nat'/>
  <bridge name='virbr13' stp='on' delay='-10000000000' />
  <mac address='52:54:00:c7:ce7'/>
  <ip address='192.168.13.13' netmask='255.255.255.0'>
  </ip>
</network>

2.define it and start
# virsh net-define net.xml
Network net4 defined from net.xml

3.# virsh net-dumpxml net4
<network>
  <name>net4</name>
  <uuid>d918f9ff-f9b2-4ab7-ae01-f1042cd303a6</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr13' stp='on' delay='-10000000000' />
  <mac address='52:54:00:c7:ce7'/>
  <ip address='192.168.13.13' netmask='255.255.255.0'>
  </ip>
</network>

4.# brctl showstp virbr13
virbr13
 bridge id                8000.525400c7ced7
 designated root        8000.525400c7ced7
 root port                   0                        path cost                   0
 max age                  20.00                        bridge max age                  20.00
 hello time                   2.00                        bridge hello time           2.00
 *forward delay                  30.00*                        bridge forward delay          30.00
 ageing time                 300.00
 hello timer                   0.93                        tcn timer                   0.00
 topology change timer           0.00                        gc timer                 236.12
 flags                        




Actual results:
Edit success with no error output, network can start normal.And dumpxml cannot
offer a right forward delay time.

Expected results:
libvirt should check stp delay time,and don't

Comment 3 Erik Skultety 2014-09-16 08:17:27 UTC
Fixed upstream:

commit 3aa0524104fd27f091483a0380fec81b3eb3a477
Author: Erik Skultety <eskultet>
Date:   Mon Sep 15 10:42:15 2014 +0200

    network: check for invalid forward delay time
    
    When spanning tree protocol is allowed in bridge settings, forward delay
    value is set as well (default is 0 if omitted). Until now, there was no
    check for delay value validity. Delay makes sense only as a positive
    numerical value.
    
    Note: However, even if you provide positive  numerical value, brctl
    utility only uses values from range <2,30>, so the number provided can
    be modified (kernel most likely) to fall within this range.

v1.2.8-139-g3aa0524

Comment 5 hongming 2015-04-10 07:24:41 UTC
Verify it as follows. The result is expected. Move its status to VERIFIED.

# rpm -q libvirt 
libvirt-1.2.14-1.el7.x86_64

# cat net.xml
<network>
  <name>testnet</name>
  <forward mode='nat'/>
  <bridge name='virbr13' stp='on' delay='-10000' />
  <mac address='52:54:00:c7:ce7'/>
  <ip address='192.168.13.13' netmask='255.255.255.0'>
  </ip>
</network>

# virsh net-define net.xml
error: Failed to define network from net.xml
error: XML error: Invalid delay value in network 'testnet'

# vim net.xml

# cat net.xml
<network>
  <name>testnet</name>
  <forward mode='nat'/>
  <bridge name='virbr13' stp='on' delay='aaa' />
  <mac address='52:54:00:c7:ce7'/>
  <ip address='192.168.13.13' netmask='255.255.255.0'>
  </ip>
</network>


# virsh net-define net.xml
error: Failed to define network from net.xml
error: XML error: Invalid delay value in network 'testnet'


# virsh net-edit default <===  change the delay value to illegal values
error: XML error: Invalid delay value in network 'default'
Failed. Try again? [y,n,f,?]:

Comment 7 errata-xmlrpc 2015-11-19 05:46:34 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.