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 1090011 - Need to limit names of new interfaces to IFNAMSIZ
Summary: Need to limit names of new interfaces to IFNAMSIZ
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: netcf
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1206680
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-22 11:32 UTC by yanbing du
Modified: 2015-11-19 08:58 UTC (History)
5 users (show)

Fixed In Version: netcf-0.2.8-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 08:58:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2248 0 normal SHIPPED_LIVE Moderate: netcf security, bug fix, and enhancement update 2015-11-19 09:11:05 UTC

Description yanbing du 2014-04-22 11:32:30 UTC
Description of problem:
in /usr/include/net/if.h. 
/* Length of interface name.  */
#define IF_NAMESIZE     16

But libvirt/netcf didn't process the name given by user, which will lead to interface/bridge start fail.

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


How reproducible:
100% 

Steps to Reproduce:
1. Create a bridge via virsh command

 # virsh iface-list --all
Name                 State      MAC Address
--------------------------------------------
eth0                 active     44:37:e6:4a:42:d1
lo                   active     00:00:00:00:00:00

# virsh iface-bridge lo abcdefghijklmnopq
Created bridge abcdefghijklmnopq with attached device lo
error: Failed to start bridge interface abcdefghijklmnopq
error: internal error: failed to create (start) interface abcdefghijklmnopq: failed to execute external program - Running 'ifup abcdefghijklmnopq' failed with exit code 1: device abcdefghijklmnopq already exists; can't create bridge with the same name

# virsh iface-list --all
Name                 State      MAC Address
--------------------------------------------
abcdefghijklmnopq    inactive
eth0                 active     44:37:e6:4a:42:d1

# brctl show
bridge name    bridge id        STP enabled    interfaces
abcdefghijklmno        8000.000000000000    no       
virbr0        8000.52540048acc5    yes        virbr0-nic

# virsh iface-unbridge abcdefghijklmnopq
Device lo un-attached from bridge abcdefghijklmnopq
Interface lo started

 virsh iface-list --all
Name                 State      MAC Address
--------------------------------------------
eth0                 active     44:37:e6:4a:42:d1
lo                   active     00:00:00:00:00:00

# brctl show
bridge name    bridge id        STP enabled    interfaces
abcdefghijklmno        8000.000000000000    no       
virbr0        8000.52540048acc5    yes        virbr0-nic

Actual result:
By using the lone bridge name, libvirt can define a bridge, but can't start it, as system only take the first 16 characters to create a bridge and which will not deleted/undefined by virsh iface-unbridge command.

Expected results:
Before create the interface/bridge, libvirt need process the name. 

Additional info:

Comment 3 John Ferlan 2015-05-19 17:06:45 UTC
This was not a libvirt issue - it was a netcf issue (changed the component).

In any case, netcf 0.2.4 has the following commit:

commit ccf88a39fb3a0efdff0fefe1903664fec541b747
Author: jmiao <jmiao>
Date:   Mon Apr 21 18:01:12 2014 +0800

    Don't allow defining an interface with length > IFNAMSIZ-1
    
    drv_define() needs to check the length of interface's name to prevent
    the actual name being different (truncated) from the configured name.
    
    Signed-off-by: jmiao <jmiao>

Which resolves the issue.

Moving to MODIFIED as once the depends on bz is resolved for RHEL7.2 this will be resolved.

FWIW: Using the same command on a much more recent upstream environment results in the following:

# virsh iface-bridge lo abcdefghijklmnopq
error: Failed to define new bridge interface abcdefghijklmnopq
error: internal error: could not get interface XML description: internal error - The interface name 'abcdefghijklmnopq' exceeds the maximum allowed length: 15

#

Comment 6 Hu Jianwei 2015-05-28 02:15:40 UTC
Verified as below:

[root@localhost ~]# rpm -q netcf
netcf-0.2.8-1.el7.x86_64
[root@localhost ~]# 
[root@localhost ~]# virsh iface-list --all
 Name                 State      MAC Address
---------------------------------------------------
 eno1                 active     24:be:05:18:81:ce
 enp2s0               inactive   00:1b:21:27:4e:ce
 lo                   active     00:00:00:00:00:00

[root@localhost ~]# virsh iface-bridge lo abcdefghijklmnopq
error: Failed to define new bridge interface abcdefghijklmnopq
error: internal error: could not get interface XML description: internal error - The interface name 'abcdefghijklmnopq' exceeds the maximum allowed length: 15

We can get expected results, changed to Verified.

Comment 8 errata-xmlrpc 2015-11-19 08:58:12 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-2248.html


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