Bug 278087

Summary: qlnxe: promiscuous and allmulti modes not handled properly [PATCH]
Product: Base System Reporter: Keith Reynolds <keith.reynolds>
Component: kernAssignee: Kevin Bowling <kbowling>
Status: Closed FIXED    
Severity: Affects Some People CC: kbowling, keithr, zlei
Priority: --- Keywords: easy, vendor
Version: 13.3-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch that fixes the bugs none

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(-)