update longest_prefix_match