See UN Convention on the Law of the Sea, Part X, Article 125 -
"Land-locked States shall have the right of access to and from the sea for the purpose of exercising the rights provided for in this Convention including those relating to the freedom of the high seas and the common heritage of mankind. To this end, land-locked States shall enjoy freedom of transit through the territory of transit States by all means of transport."
Again, the NATO also violated all UN resolutions as well when they killed Pakistani soldiers.