Skip to content

Commit 6454743

Browse files
dsahernborkmann
authored andcommitted
net/ipv6: Rename fib6_lookup to fib6_node_lookup
Rename fib6_lookup to fib6_node_lookup to better reflect what it returns. The fib6_lookup name will be used in a later patch for an IPv6 equivalent to IPv4's fib_lookup. Signed-off-by: David Ahern <dsahern@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent 68625b7 commit 6454743

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

include/net/ip6_fib.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,9 @@ struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6,
376376
const struct sk_buff *skb,
377377
int flags, pol_lookup_t lookup);
378378

379-
struct fib6_node *fib6_lookup(struct fib6_node *root,
380-
const struct in6_addr *daddr,
381-
const struct in6_addr *saddr);
379+
struct fib6_node *fib6_node_lookup(struct fib6_node *root,
380+
const struct in6_addr *daddr,
381+
const struct in6_addr *saddr);
382382

383383
struct fib6_node *fib6_locate(struct fib6_node *root,
384384
const struct in6_addr *daddr, int dst_len,

net/ipv6/ip6_fib.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,8 +1354,8 @@ struct lookup_args {
13541354
const struct in6_addr *addr; /* search key */
13551355
};
13561356

1357-
static struct fib6_node *fib6_lookup_1(struct fib6_node *root,
1358-
struct lookup_args *args)
1357+
static struct fib6_node *fib6_node_lookup_1(struct fib6_node *root,
1358+
struct lookup_args *args)
13591359
{
13601360
struct fib6_node *fn;
13611361
__be32 dir;
@@ -1400,7 +1400,8 @@ static struct fib6_node *fib6_lookup_1(struct fib6_node *root,
14001400
#ifdef CONFIG_IPV6_SUBTREES
14011401
if (subtree) {
14021402
struct fib6_node *sfn;
1403-
sfn = fib6_lookup_1(subtree, args + 1);
1403+
sfn = fib6_node_lookup_1(subtree,
1404+
args + 1);
14041405
if (!sfn)
14051406
goto backtrack;
14061407
fn = sfn;
@@ -1422,8 +1423,9 @@ static struct fib6_node *fib6_lookup_1(struct fib6_node *root,
14221423

14231424
/* called with rcu_read_lock() held
14241425
*/
1425-
struct fib6_node *fib6_lookup(struct fib6_node *root, const struct in6_addr *daddr,
1426-
const struct in6_addr *saddr)
1426+
struct fib6_node *fib6_node_lookup(struct fib6_node *root,
1427+
const struct in6_addr *daddr,
1428+
const struct in6_addr *saddr)
14271429
{
14281430
struct fib6_node *fn;
14291431
struct lookup_args args[] = {
@@ -1442,7 +1444,7 @@ struct fib6_node *fib6_lookup(struct fib6_node *root, const struct in6_addr *dad
14421444
}
14431445
};
14441446

1445-
fn = fib6_lookup_1(root, daddr ? args : args + 1);
1447+
fn = fib6_node_lookup_1(root, daddr ? args : args + 1);
14461448
if (!fn || fn->fn_flags & RTN_TL_ROOT)
14471449
fn = root;
14481450

net/ipv6/route.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ static struct fib6_node* fib6_backtrack(struct fib6_node *fn,
10061006
pn = rcu_dereference(fn->parent);
10071007
sn = FIB6_SUBTREE(pn);
10081008
if (sn && sn != fn)
1009-
fn = fib6_lookup(sn, NULL, saddr);
1009+
fn = fib6_node_lookup(sn, NULL, saddr);
10101010
else
10111011
fn = pn;
10121012
if (fn->fn_flags & RTN_RTINFO)
@@ -1059,7 +1059,7 @@ static struct rt6_info *ip6_pol_route_lookup(struct net *net,
10591059
flags &= ~RT6_LOOKUP_F_IFACE;
10601060

10611061
rcu_read_lock();
1062-
fn = fib6_lookup(&table->tb6_root, &fl6->daddr, &fl6->saddr);
1062+
fn = fib6_node_lookup(&table->tb6_root, &fl6->daddr, &fl6->saddr);
10631063
restart:
10641064
f6i = rcu_dereference(fn->leaf);
10651065
if (!f6i) {
@@ -1815,7 +1815,7 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
18151815

18161816
rcu_read_lock();
18171817

1818-
fn = fib6_lookup(&table->tb6_root, &fl6->daddr, &fl6->saddr);
1818+
fn = fib6_node_lookup(&table->tb6_root, &fl6->daddr, &fl6->saddr);
18191819
saved_fn = fn;
18201820

18211821
if (fl6->flowi6_flags & FLOWI_FLAG_SKIP_NH_OIF)
@@ -2425,7 +2425,7 @@ static struct rt6_info *__ip6_route_redirect(struct net *net,
24252425
*/
24262426

24272427
rcu_read_lock();
2428-
fn = fib6_lookup(&table->tb6_root, &fl6->daddr, &fl6->saddr);
2428+
fn = fib6_node_lookup(&table->tb6_root, &fl6->daddr, &fl6->saddr);
24292429
restart:
24302430
for_each_fib6_node_rt_rcu(fn) {
24312431
if (rt->fib6_nh.nh_flags & RTNH_F_DEAD)

0 commit comments

Comments
 (0)