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
MFC after:	3 days
Reviewed by:	markj
Sponsored by:	Juniper Networks, Inc., Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D28667
This commit is contained in:
Allan Jude 2021-02-14 18:39:09 +00:00
parent 97527e9c4f
commit 922cf8ac43

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);
}