I once read the book "Kashmir: The Storm Center of the World" by Indian nationalist and intellectual Raj Madhok.
In chapter 12 "The Chinese Factor", he made a very interesting point about the Sino-Indian War, and how Pakistan could have formed a friendship with India at the time...
An excerpt from Raj Madhok's book "Kashmir: The Storm Center of the World"
"As the Chinese offensive mounted and India's unpreparedness became woefully exposed, the government of India was forced to request the USA, the UK and other friendly countries for help to meet the Communist advance. Realizing the magnitude of the threat and its dangerous implications for the entire free world, the USA and the UK responded magnificently.
Pakistan too should have come to the help of India both because the Chinese Comrnunist expansion was as much a threat to her as to India and also because she had been given arms aid by the USA on the specific understanding that she would use it against Communist expansion and aggression whether it came from the USSR or from China.
But Pakistan not only did not make any friendly gesture to India but what was worse, she vehemently protested to the USA and the UK for having extended military aid to India.
This attitude of Pakistan must have come as a shock and an eye-opener to the USA. It only confirmed the Indian view that Pakistan had obtained military aid from the USA only for use against India and not for assisting the free world in containing Communist expansion.
By behaving as she did,
Pakistan lost an excellent opportunity of reversing the trend of Indo-Pak relations since 1947.
Had Pakistan openly and unreservedly come to the aid of India in her time of need, there might have been created the necessary fund of goodwill and proper atmosphere for the settlement of all Indo-Pak disputes including the one regarding Kashmir in a friendly spirit of give and take. But in view of later developments, there are reasons to believe that Pakistan stood committed to China not to go to India's help and that some secret deal about the distribution of Assam territory had been arrived at between the two before China started the invasion. That explains the refusal of Muslims in Assam to evacuate Tezpur when evacuation of its civil population was ordered by the authorities."
Here is an online source of the book:
http://www.kashmir-information.com/Storm/chapter12.html
He makes a very interesting point.
What Raj Madhok argues is in the 1962 Sino-Indian War, Pakistan should have come to India's rescue (militarily) against China. He mentions Chinese expansionist policy is as much as a danger to Pakistan as India, which today we can say that is incorrect. Though perhaps their is merit in relations between Pakistan and India would have substantially improved, and such a gesture could have averted the 1962, 71, and other wars...
IMHO, Pakistan did the right thing my forming an alliance with China. In fact, IMHO one of the greatest diplomatic and strategic thinking was made by Pakistan and that was to form the Sino-Pakistan alliance.
Only a few nations in the world hold such an exclusive partnership and treasure.