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 1367071 - "ip macsec help" fails when a macsec module not loaded
Summary: "ip macsec help" fails when a macsec module not loaded
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: iproute
Version: 7.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Timothy Redaelli
QA Contact: Jaroslav Aster
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-15 12:24 UTC by Marek Marusic
Modified: 2017-08-01 21:32 UTC (History)
9 users (show)

Fixed In Version: iproute-3.10.0-78.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 21:32:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2171 0 normal SHIPPED_LIVE iproute bug fix and enhancement update 2017-08-01 18:40:13 UTC

Description Marek Marusic 2016-08-15 12:24:22 UTC
Description of problem:
Command "ip macsec help" fails with "RTNETLINK answers: No such file or directory" when a macsec module not loaded.

Version-Release number of selected component (if applicable):
iproute-3.10.0-72.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1.$ rmmod macsec #only if loaded before
2.$ ip macsec help

Actual results:
$ ip macsec help
RTNETLINK answers: No such file or directory
Error talking to the kernel

Expected results:
When the module is loaded the help is printed as expected.
$ modprobe macsec
$ ip macsec help
Usage: ip macsec add DEV tx sa { 0..3 } [ OPTS ] key ID KEY
       ip macsec set DEV tx sa { 0..3 } [ OPTS ]
       ip macsec del DEV tx sa { 0..3 }
       ip macsec add DEV rx SCI [ on | off ]
       ip macsec set DEV rx SCI [ on | off ]
       ip macsec del DEV rx SCI
       ip macsec add DEV rx SCI sa { 0..3 } [ OPTS ] key ID KEY
       ip macsec set DEV rx SCI sa { 0..3 } [ OPTS ]
       ip macsec del DEV rx SCI sa { 0..3 }
       ip macsec show
       ip macsec show DEV
where  OPTS := [ pn <u32> ] [ on | off ]
       ID   := 128-bit hex string
       KEY  := 128-bit hex string
       SCI  := { sci <u64> | port <u16> address <lladdr> }

Additional info:

Comment 1 Hangbin Liu 2016-08-26 08:44:13 UTC
commit 688f9aa4f24ffac148f6b4127602f10a7837d4ba
Author: Sabrina Dubroca <sd>
Date:   Tue Aug 16 16:26:56 2016 +0200

    macsec: show usage even if the module is not available

    Currently, the `ip macsec` command tries to initialize a genl context
    even when we just want to see the help for the command, which doesn't
    require to talk to the kernel at all.

    Delay genl initialization, which can fail if the module isn't loaded,
    until the point where we will actually need it.

    Fixes: b26fc590ce62 ("ip: add MACsec support")
    Signed-off-by: Sabrina Dubroca <sd>

Comment 2 Phil Sutter 2016-08-26 16:36:40 UTC
Hi Hangbin,

(In reply to Hangbin Liu from comment #1)
> commit 688f9aa4f24ffac148f6b4127602f10a7837d4ba
> Author: Sabrina Dubroca <sd>
> Date:   Tue Aug 16 16:26:56 2016 +0200

Thanks for identifying this!

Cheers, Phil

Comment 3 Timothy Redaelli 2017-02-10 11:53:16 UTC
Backported commits:

commit 2b68cb77cde32f5cba5f984e15fc402758edea76
Author: Sabrina Dubroca <sd>
Date:   Tue Aug 16 16:26:55 2016 +0200

    libgenl: introduce genl_init_handle
    
    All users of genl have the same code to open a genl socket and resolve
    the family for their specific protocol.  Introduce a helper to initialize
    the handle, and use it in all the genl code.
    
    Signed-off-by: Sabrina Dubroca <sd>

commit 688f9aa4f24ffac148f6b4127602f10a7837d4ba
Author: Sabrina Dubroca <sd>
Date:   Tue Aug 16 16:26:56 2016 +0200

    macsec: show usage even if the module is not available

    Currently, the `ip macsec` command tries to initialize a genl context
    even when we just want to see the help for the command, which doesn't
    require to talk to the kernel at all.

    Delay genl initialization, which can fail if the module isn't loaded,
    until the point where we will actually need it.

    Fixes: b26fc590ce62 ("ip: add MACsec support")
    Signed-off-by: Sabrina Dubroca <sd>

Comment 4 Phil Sutter 2017-02-21 17:44:40 UTC
Hi Marek,

Do you have capabilities to do the necessary testing for this ticket? If so, could you please give qa_ack+?

Thanks, Phil

Comment 7 errata-xmlrpc 2017-08-01 21:32:13 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://access.redhat.com/errata/RHBA-2017:2171


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