Add route_cmp function to compare route