Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22118
b: refs/heads/master
c: 1ddef04
h: refs/heads/master
v: v3
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Mar 21, 2006
1 parent 437285c commit c39c9fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 118f8c1654b8f2e79fa0eb8b2d84283ab62a5498
refs/heads/master: 1ddef044ed9dd6c7c23562d1140522e28de888a5
33 changes: 7 additions & 26 deletions trunk/net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,18 +426,12 @@ void ip6_route_input(struct sk_buff *skb)
restart:
rt = fn->leaf;

if ((rt->rt6i_flags & RTF_CACHE)) {
rt = rt6_select(&fn->leaf, skb->dev->ifindex, strict | RT6_SELECT_F_REACHABLE);
if (rt == &ip6_null_entry)
rt = rt6_select(&fn->leaf, skb->dev->ifindex, strict);
BACKTRACK();
goto out;
}

rt = rt6_select(&fn->leaf, skb->dev->ifindex, strict | RT6_SELECT_F_REACHABLE);
if (rt == &ip6_null_entry)
rt = rt6_select(&fn->leaf, skb->dev->ifindex, strict);
BACKTRACK();
if ((rt->rt6i_flags & RTF_CACHE))
goto out;

dst_hold(&rt->u.dst);
read_unlock_bh(&rt6_lock);
Expand Down Expand Up @@ -498,25 +492,12 @@ struct dst_entry * ip6_route_output(struct sock *sk, struct flowi *fl)
fn = fib6_lookup(&ip6_routing_table, &fl->fl6_dst, &fl->fl6_src);

restart:
rt = fn->leaf;

if ((rt->rt6i_flags & RTF_CACHE)) {
rt = rt6_select(&fn->leaf, fl->oif, strict | RT6_SELECT_F_REACHABLE);
if (rt == &ip6_null_entry)
rt = rt6_select(&fn->leaf, fl->oif, strict);
BACKTRACK();
rt = rt6_select(&fn->leaf, fl->oif, strict | RT6_SELECT_F_REACHABLE);
if (rt == &ip6_null_entry)
rt = rt6_select(&fn->leaf, fl->oif, strict);
BACKTRACK();
if ((rt->rt6i_flags & RTF_CACHE))
goto out;
}
if (rt->rt6i_flags & RTF_DEFAULT) {
rt = rt6_select(&fn->leaf, fl->oif, strict | RT6_SELECT_F_REACHABLE);
if (rt == &ip6_null_entry)
rt = rt6_select(&fn->leaf, fl->oif, strict);
} else {
rt = rt6_select(&fn->leaf, fl->oif, strict | RT6_SELECT_F_REACHABLE);
if (rt == &ip6_null_entry)
rt = rt6_select(&fn->leaf, fl->oif, strict);
BACKTRACK();
}

dst_hold(&rt->u.dst);
read_unlock_bh(&rt6_lock);
Expand Down

0 comments on commit c39c9fb

Please sign in to comment.