Bug 1953847
Summary: | [ethtool] The `NLM_F_MULTI` should be used for `NLM_F_DUMP` | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Gris Ge <fge> | ||||
Component: | kernel | Assignee: | Antoine Tenart <atenart> | ||||
kernel sub component: | Networking | QA Contact: | Tianhao <tizhao> | ||||
Status: | CLOSED ERRATA | Docs Contact: | |||||
Severity: | low | ||||||
Priority: | low | CC: | atenart, atragler, brdeoliv, jiji, kzhang, network-qe, sukulkar, tizhao, yuma | ||||
Version: | 8.4 | ||||||
Target Milestone: | beta | ||||||
Target Release: | 8.5 | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | kernel-4.18.0-313.el8 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2021-11-09 19:14:27 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: | |||||||
Attachments: |
|
A fix was sent upstream by Fernando, https://lore.kernel.org/netdev/20210504224714.7632-1-ffmancera@riseup.net/T/#u Are the following outputs expected? before fix: [root@dell-per7515-01 ~]# ./test Dumping route rule Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Dumping ethtool pause Got family ID of ethtool 20 Got nl message with flags: 0() Got nl message with flags: 0() Got nl message with flags: 0() Got nl message with flags: 0() Got nl message with flags: 0() after fix: [root@dell-per7515-01 ~]# ./test Dumping route rule Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Dumping ethtool pause Got family ID of ethtool 20 Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) ^C (In reply to Tianhao from comment #6) > Are the following outputs expected? > > before fix: > [root@dell-per7515-01 ~]# ./test > Dumping route rule > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Dumping ethtool pause > Got family ID of ethtool 20 > Got nl message with flags: 0() > Got nl message with flags: 0() > Got nl message with flags: 0() > Got nl message with flags: 0() > Got nl message with flags: 0() > > > after fix: > [root@dell-per7515-01 ~]# ./test > Dumping route rule > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Dumping ethtool pause > Got family ID of ethtool 20 > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > ^C Yes, this shows the fix worked as expected. Thanks! Ethtool basic tests passed on the kernel-4.18.0-305.3.el8.mr534_210510_1425. Based on comment #6 and comment #7, set TESTED. Done code check. The ethtool tests are done in pre-testing. Set verified based on the results. 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-2021:4356 |
Created attachment 1775845 [details] Reproduce C code Description of problem: When using `NLM_F_DUMP` to dump ethtool information for all interfaces, the replied netlink message is not using `NLM_F_MULTI` flag. Version-Release number of selected component (if applicable): kernel-4.18.0-304.el8.x86_64 How reproducible: 100% Steps to Reproduce: 1. sudo dnf install -y gcc libnl3-devel 2. gcc -o test -I/usr/include/libnl3 test.c -L/usr/lib64 -lnl-3 -lnl-genl-3 3. ./test Actual results: The nl_message reply of ethtool features dump is not using NLM_F_MULTI Expected results: The nl_message reply of ethtool features dump is using NLM_F_MULTI Additional info: The test C code is showing route rule dumping is using NLM_F_MULTI