aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Jude <allanjude@FreeBSD.org>2021-02-14 18:39:09 +0000
committerAllan Jude <allanjude@FreeBSD.org>2021-02-19 20:39:16 +0000
commit18f552e647f556dcbbebc627f534d15172e7b6a3 (patch)
tree6a4a6e7e537a6e384889dd785c36e8c1be6725e3
parentd889bc57622cb1f63e0070fc32a5d5736ff0f71d (diff)
downloadsrc-18f552e647f556dcbbebc627f534d15172e7b6a3.tar.gz
src-18f552e647f556dcbbebc627f534d15172e7b6a3.zip
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 922cf8ac43adc9983f9a9e05cfd838306c1ef483)
-rw-r--r--sys/net/iflib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index cce56d0e7335..a33ddbe5b8ae 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -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);
}