Use iflib_if_init_locked() during media change instead of iflib_init_locked().

iflib_init_locked() assumes that iflib_stop() has been called, however,
it is not called for media changes.
iflib_if_init_locked() calls stop then init, so fixes the problem.

PR:	253473
Sponsored by:	Juniper Networks, Inc., Klara, Inc.

(cherry picked from commit 922cf8ac43)
This commit is contained in:
Allan Jude 2021-02-14 18:39:09 +00:00
parent d889bc5762
commit 18f552e647

View file

@ -2503,7 +2503,7 @@ iflib_media_change(if_t ifp)
CTX_LOCK(ctx);
if ((err = IFDI_MEDIA_CHANGE(ctx)) == 0)
iflib_init_locked(ctx);
iflib_if_init_locked(ctx);
CTX_UNLOCK(ctx);
return (err);
}