• David Ahern's avatar
    ipv6: Refactor find_rr_leaf · 30c15f03
    David Ahern authored
    find_rr_leaf has 3 loops over fib_entries calling find_match. The loops
    are very similar with differences in start point and whether the metric
    is evaluated:
        1. start at rr_head, no extra loop compare, check fib metric
        2. start at leaf, compare rt against rr_head, check metric
        3. start at cont (potential saved point from earlier loops), no
           extra loop compare, no metric check
    
    Create 1 loop that is called 3 different times. This will make a
    later change with multipath nexthop objects much simpler.
    Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    30c15f03
route.c 134 KB