Pakistan should use Afghanistan's isolation and economic vulnerability to fence what remains of the border. At worst, I would be happy to see us fence slightly (a few KM) inside our own territory. Then work on mining the border and continually improving it. Pakistan should have a permanently sealed land border with Afghanistan with stringently controlled crossings.
Pakistan has propped up the Afghan nation for 40 years now, taking in millions of refugees. If the military establishment had gone down the road suggested by
@Menace2Society then there would be no Taliban today, whatever the historically inaccurate 'graveyard of empires' tells us otherwise. This "big brother, little brother" approach is wearing thin and the blame, I believe, lies squarely at the feet of Imran Khan and his infantile peacenik delusions. It should be made clear to Kabul that continued support from what is essentially its only friend is dependent on it controlling its goons on the border. If they can't, then they should decide whether starving and collapsing internally is really a better alternative.