Bug 278087 - qlnxe: promiscuous and allmulti modes not handled properly [PATCH]
Summary: qlnxe: promiscuous and allmulti modes not handled properly [PATCH]
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.3-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Kevin Bowling
URL:
Keywords: easy, vendor
Depends on:
Blocks:
 
Reported: 2024-04-01 05:43 UTC by Keith Reynolds
Modified: 2024-06-07 05:53 UTC (History)
3 users (show)

See Also:


Attachments
patch that fixes the bugs (3.07 KB, patch)
2024-04-01 05:44 UTC, Keith Reynolds
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Reynolds 2024-04-01 05:43:38 UTC
The qlnxe_ioctl() function checks whether the IFF_PROMISC or IFF_ALLMULTI bits have changed since the last time the bits were saved, but it only saves the bits when the interface is marked down, so it misses some changes to those bits. Also, when it does detect a change in the bits, it always turns on those modes (promiscuous or allmulti), even if the change was to turn the interface bits off. And, when the interface is reset (such as when the MAC address is changed), it doesn't check those bits, so it always turns those modes off even if the interface bits are set.
Comment 1 Keith Reynolds 2024-04-01 05:44:03 UTC
Created attachment 249622 [details]
patch that fixes the bugs
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-05-28 05:59:29 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=e3ec564ecb9c2daa96a8db36052e50ea554fe598

commit e3ec564ecb9c2daa96a8db36052e50ea554fe598
Author:     Keith Reynolds <keith.reynolds@hpe.com>
AuthorDate: 2024-05-28 05:57:44 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2024-05-28 05:57:44 +0000

    qlnxe: Fix promiscuous and allmulti settings

    PR:             278087
    MFC after:      1 week

 sys/dev/qlnx/qlnxe/qlnx_os.c | 33 ++++++++++++++++++++++-----------
 1 file changed, 22 insertions(+), 11 deletions(-)
Comment 3 Zhenlei Huang freebsd_committer freebsd_triage 2024-05-28 06:20:19 UTC
I guess this can fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265857 .
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-06-07 05:50:22 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=e4f48fc20b56df8a03ab63fb867f49bfcc0e7eae

commit e4f48fc20b56df8a03ab63fb867f49bfcc0e7eae
Author:     Keith Reynolds <keith.reynolds@hpe.com>
AuthorDate: 2024-05-28 05:57:44 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2024-06-07 05:48:48 +0000

    qlnxe: Fix promiscuous and allmulti settings

    PR:             278087

    (cherry picked from commit e3ec564ecb9c2daa96a8db36052e50ea554fe598)

 sys/dev/qlnx/qlnxe/qlnx_os.c | 33 ++++++++++++++++++++++-----------
 1 file changed, 22 insertions(+), 11 deletions(-)