By default, a switch selects reverse path forwarding (RPF) routes based on route preference. If you change the RPF check policy to longest match, the switch compares mask lengths of routes to select an RPF route, and compares route preference when multiple routes have the longest mask length.