]> Git Repo - linux.git/commitdiff
ipv6: Move fib6_multipath_select down in ip6_pol_route
authorDavid Ahern <[email protected]>
Tue, 9 Apr 2019 21:41:17 +0000 (14:41 -0700)
committerDavid S. Miller <[email protected]>
Thu, 11 Apr 2019 21:24:06 +0000 (14:24 -0700)
Move the siblings and fib6_multipath_select after the null entry check
since a null entry can not have siblings.

Signed-off-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/ipv6/route.c

index 0745ed872e5b20608f2aa0b3961c84c6af3b3a55..4acb71f0bc5502e42c6e4310e9af5244883b3477 100644 (file)
@@ -1843,9 +1843,6 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
        rcu_read_lock();
 
        f6i = fib6_table_lookup(net, table, oif, fl6, strict);
-       if (f6i->fib6_nsiblings)
-               f6i = fib6_multipath_select(net, f6i, fl6, oif, skb, strict);
-
        if (f6i == net->ipv6.fib6_null_entry) {
                rt = net->ipv6.ip6_null_entry;
                rcu_read_unlock();
@@ -1853,6 +1850,9 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
                return rt;
        }
 
+       if (f6i->fib6_nsiblings)
+               f6i = fib6_multipath_select(net, f6i, fl6, oif, skb, strict);
+
        /*Search through exception table */
        rt = rt6_find_cached_rt(f6i, &fl6->daddr, &fl6->saddr);
        if (rt) {
This page took 0.061363 seconds and 4 git commands to generate.