summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorEric Joyner <erj@FreeBSD.org>2019-09-30 18:22:33 +0000
committerEric Joyner <erj@FreeBSD.org>2019-09-30 18:22:33 +0000
commita94d7c59cf5550511055475fca3c065afbcd482a (patch)
tree6f6f56cca12572d7f9b8baa991020aa2ac5dc30c /sys/net
parentcc0d343bd4e09d49193b50d2b8588c3de669a9d2 (diff)
Notes
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/iflib.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index 1c6a26249a60..9950083490ad 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -4260,6 +4260,9 @@ iflib_vlan_register(void *arg, if_t ifp, uint16_t vtag)
if ((vtag == 0) || (vtag > 4095))
return;
+ if (iflib_in_detach(ctx))
+ return;
+
CTX_LOCK(ctx);
IFDI_VLAN_REGISTER(ctx, vtag);
/* Re-init to load the changes */
@@ -5025,12 +5028,6 @@ iflib_device_deregister(if_ctx_t ctx)
iflib_stop(ctx);
CTX_UNLOCK(ctx);
- /* Unregister VLAN events */
- if (ctx->ifc_vlan_attach_event != NULL)
- EVENTHANDLER_DEREGISTER(vlan_config, ctx->ifc_vlan_attach_event);
- if (ctx->ifc_vlan_detach_event != NULL)
- EVENTHANDLER_DEREGISTER(vlan_unconfig, ctx->ifc_vlan_detach_event);
-
iflib_netmap_detach(ifp);
ether_ifdetach(ifp);
if (ctx->ifc_led_dev != NULL)