git: 55760984d56b - main - igc: Don't start in promiscious mode by default

From: Kornel Dulęba <kd_at_FreeBSD.org>
Date: Mon, 19 Sep 2022 07:27:04 UTC
The branch main has been updated by kd:

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

commit 55760984d56bb1a4c6bc8040ae022353667258e2
Author:     Hubert Mazur <hum@semihalf.com>
AuthorDate: 2022-09-16 11:37:12 +0000
Commit:     Kornel Dulęba <kd@FreeBSD.org>
CommitDate: 2022-09-19 07:18:19 +0000

    igc: Don't start in promiscious mode by default
    
    The igc driver always sets the promiscious mode during initialization,
    ignoring what is set in ifp.
    Fix this by checking the interface flags and setting mode appropriately.
    
    Reviewed by:    grehan
    Obtained from:  Semihalf
    Sponsored by:   Stormshield
    MFC after:      1 week
    Differential Revision: https://reviews.freebsd.org/D36591
---
 sys/dev/igc/if_igc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c
index b3de0f123c5c..de12f81cf073 100644
--- a/sys/dev/igc/if_igc.c
+++ b/sys/dev/igc/if_igc.c
@@ -858,7 +858,7 @@ igc_if_init(if_ctx_t ctx)
 	}
 
 	/* Don't lose promiscuous settings */
-	igc_if_set_promisc(ctx, IFF_PROMISC);
+	igc_if_set_promisc(ctx, if_getflags(ifp));
 	igc_clear_hw_cntrs_base_generic(&adapter->hw);
 
 	if (adapter->intr_type == IFLIB_INTR_MSIX) /* Set up queue routing */