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 21:06:15 +0000
commit57d2eb8896c2dd9ece7d99415893e2e8a8bfce82 (patch)
treeb5aefdd0976384ceb6693e0c25118f44ead4a82b
parent79bee465de342b82fa300293d04f155f2d6a6183 (diff)
downloadsrc-57d2eb8896c2dd9ece7d99415893e2e8a8bfce82.tar.gz
src-57d2eb8896c2dd9ece7d99415893e2e8a8bfce82.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 ae203d871a5c..f99b076cf0d3 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -2577,7 +2577,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);
}