A Low Earth Orbit (LEO) mega constellation (MC) is a satellite network of hundreds of spacecrafts organized in several orbital planes, which can be deployed at different inclinations and altitudes. Beyond the connection to the ground segment, the direct inter-satellite communication, both intraplane and inter-plane, is also used. One of the challenges in LEO MCs is the development of efficient routing strategies that scale up with the size of the network. We propose a simple distributed routing algorithm, GomHop, to find the best nexthop for forwarding a packet in a connection-less network. Each satellite runs the on-board algorithm autonomously, with no need for the ground segment to calculate, maintain and distribute routing tables. GomHop minimizes the number of required interplane hops, which are typically more challenging and expensive for the network, and relies mostly on intra-plane hops. The simulation results show that the overall performance is very close to the centralized optimal solution provided by the Dijkstra algorithm, with GomHop having a smaller amount of inter-plane hops and low complexity, in contrast to the O(N 2 ) of Dijkstra.