[PATCH] ospf: Improve calc_next_hop()