diff options
author | Wei Wang <weiwan@google.com> | 2017-10-06 12:06:02 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-07 21:22:57 +0100 |
commit | 38fbeeeeccdb38d0635398e8e344d245f6d8dc52 (patch) | |
tree | dbdcbf11c2822cd52ff757410ecdea0db0ad3865 /net/ipv6/addrconf.c | |
parent | c757faa8bfa26a0dd24b41ff783e0da042156887 (diff) | |
download | linux-stable-38fbeeeeccdb38d0635398e8e344d245f6d8dc52.tar.gz linux-stable-38fbeeeeccdb38d0635398e8e344d245f6d8dc52.tar.bz2 linux-stable-38fbeeeeccdb38d0635398e8e344d245f6d8dc52.zip |
ipv6: prepare fib6_locate() for exception table
fib6_locate() is used to find the fib6_node according to the passed in
prefix address key. It currently tries to find the fib6_node with the
exact match of the passed in key. However, when we move cached routes
into the exception table, fib6_locate() will fail to find the fib6_node
for it as the cached routes will be stored in the exception table under
the fib6_node with the longest prefix match of the cache's dst addr key.
This commit adds a new parameter to let the caller specify if it needs
exact match or longest prefix match.
Right now, all callers still does exact match when calling
fib6_locate(). It will be changed in later commit where exception table
is hooked up to store cached routes.
Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 837418ff2d4b..3ccaf52824c9 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2322,7 +2322,7 @@ static struct rt6_info *addrconf_get_prefix_route(const struct in6_addr *pfx, return NULL; read_lock_bh(&table->tb6_lock); - fn = fib6_locate(&table->tb6_root, pfx, plen, NULL, 0); + fn = fib6_locate(&table->tb6_root, pfx, plen, NULL, 0, true); if (!fn) goto out; |