how longest prefix match works in routing