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.
Created attachment 249622 [details] patch that fixes the bugs
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(-)
I guess this can fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265857 .
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(-)