summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2020-09-12 18:58:36 +0000
committerKristof Provost <kp@FreeBSD.org>2020-09-12 18:58:36 +0000
commitc55ffe543826f574f6560b05642ee4c06178853c (patch)
tree781b4a59d29efdb472e5a679d4b560120cf071cb
parentf76742c89277060d0a1830fb51068d1573893483 (diff)
downloadsrc-test2-c55ffe543826f574f6560b05642ee4c06178853c.tar.gz
src-test2-c55ffe543826f574f6560b05642ee4c06178853c.zip
Notes
-rw-r--r--sys/net/if.c4
-rw-r--r--sys/net/if_epair.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 66695a0fa654..da55e4b64c72 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1280,6 +1280,10 @@ if_vmove(struct ifnet *ifp, struct vnet *new_vnet)
ifindex_free_locked(ifp->if_index);
IFNET_WUNLOCK();
+ /* Don't re-attach DYING interfaces. */
+ if (ifp->if_flags & IFF_DYING)
+ return;
+
/*
* Perform interface-specific reassignment tasks, if provided by
* the driver.
diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c
index 376bdbe9117f..82f7b4fd559d 100644
--- a/sys/net/if_epair.c
+++ b/sys/net/if_epair.c
@@ -609,8 +609,14 @@ epair_qflush(struct ifnet *ifp)
struct epair_softc *sc;
sc = ifp->if_softc;
- KASSERT(sc != NULL, ("%s: ifp=%p, epair_softc gone? sc=%p\n",
- __func__, ifp, sc));
+
+ /*
+ * See epair_clone_destroy(), we can end up getting called twice.
+ * Don't do anything on the second call.
+ */
+ if (sc == NULL)
+ return;
+
/*
* Remove this ifp from all backpointer lists. The interface will not
* usable for flushing anyway nor should it have anything to flush