If pakistan is busy fighting extremists then there is some hope for them. In the meantime, since pakistani government is busy fighting extremists and extremists are busy fighting pakistan government. So hopefully, none of them will have time to create trouble in India.
A peaceful and friendly pakistan is the best option. But if that is not possible then this is probably the second best option.