Bug 2062780

Summary: Make possible to get information about network interface over rtnetlink using alternative interface name
Product: Red Hat Enterprise Linux 8 Reporter: Michal Sekletar <msekleta>
Component: kernelAssignee: Xin Long <lxin>
kernel sub component: Networking QA Contact: Tianhao <tizhao>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: jiji, kzhang, lxin, mhou, mleitner, mschmidt, sukulkar, yuma
Version: 8.6Keywords: FutureFeature, Triaged
Target Milestone: rc   
Target Release: 8.7   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-4.18.0-401.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-08 10:24:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Sekletar 2022-03-10 15:14:55 UTC
Description of problem:
Our RHEL-8 kernel has support for setting alternative names for network interfaces, introduced in [1]. However, we are missing support for querying the information about the interface using its previously set alternative name. Hence, I'd like to request the backport of [2] which introduces this possibility.

Version-Release number of selected component (if applicable):
kernel-4.18.0-348.12.2.el8_5

How reproducible:
deterministic

Steps to Reproduce:
1. ip link add type dummy dummy0
2. ip link prop add dummy0 altname dum0 
3. ip link prop add dummy0 altname longalternativeinterfacenameofdummy0
4. ip link show dum0
5. ip link show longalternativeinterfacenameofdummy0

Actual results:
ip link show dum0
4: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 66:3e:3b:58:90:66 brd ff:ff:ff:ff:ff:ff
ip link show longalternativeinterfacenameofdummy0
Device "longalternativeinterfacenameofdummy0" does not exist.

Expected results:
Using name "longalternativeinterfacenameofdummy0" should also be usable to query the information about the interface.

Additional info:
[1] https://github.com/torvalds/linux/commit/7a56493f0620cc1b4cffc9bc59289fdefe76b5f3
[2] https://github.com/torvalds/linux/commit/76c9ac0ee878f6693d398d3a95ccaf85e1f597a6

Comment 8 Tianhao 2022-06-14 03:42:14 UTC
Checked the bug is fixed. Set TESTED.

[root@dell-per730-49 ~]# uname -r
4.18.0-396.g413c.el8.mr2584_220531_1211.x86_64
[root@dell-per730-49 ~]# ip link add type dummy dummy0
[root@dell-per730-49 ~]# ip link prop add dummy0 altname dum0
[root@dell-per730-49 ~]# ip link prop add dummy0 altname longalternativeinterfacenameofdummy0
[root@dell-per730-49 ~]# ip link show dum0
8: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether ce:7e:98:34:a4:0d brd ff:ff:ff:ff:ff:ff
    altname dum0
    altname longalternativeinterfacenameofdummy0
[root@dell-per730-49 ~]# ip link show longalternativeinterfacenameofdummy0
8: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether ce:7e:98:34:a4:0d brd ff:ff:ff:ff:ff:ff
    altname dum0
    altname longalternativeinterfacenameofdummy0

Comment 13 Tianhao 2022-06-22 05:31:07 UTC
Done code check. Set verified.

Comment 15 errata-xmlrpc 2022-11-08 10:24:07 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 (Moderate: kernel security, bug fix, and enhancement update), 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://access.redhat.com/errata/RHSA-2022:7683