diff --git a/sys/net/iflib.c b/sys/net/iflib.c --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -4473,7 +4473,7 @@ { if_ctx_t ctx = if_getsoftc(ifp); - if ((void *)ctx != arg) + if ((void *)ifp != arg) return; if ((vtag == 0) || (vtag > 4095)) @@ -4498,7 +4498,7 @@ { if_ctx_t ctx = if_getsoftc(ifp); - if ((void *)ctx != arg) + if ((void *)ifp != arg) return; if ((vtag == 0) || (vtag > 4095)) @@ -5830,10 +5830,10 @@ iflags |= IFF_BROADCAST | IFF_SIMPLEX; if_setflags(ifp, iflags); ctx->ifc_vlan_attach_event = - EVENTHANDLER_REGISTER(vlan_config, iflib_vlan_register, ctx, + EVENTHANDLER_REGISTER(vlan_config, iflib_vlan_register, ifp, EVENTHANDLER_PRI_FIRST); ctx->ifc_vlan_detach_event = - EVENTHANDLER_REGISTER(vlan_unconfig, iflib_vlan_unregister, ctx, + EVENTHANDLER_REGISTER(vlan_unconfig, iflib_vlan_unregister, ifp, EVENTHANDLER_PRI_FIRST); if ((sctx->isc_flags & IFLIB_DRIVER_MEDIA) == 0) {