Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22112
b: refs/heads/master
c: fb9de91
h: refs/heads/master
v: v3
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Mar 21, 2006
1 parent 029190a commit 237d386
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 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: d5315b500b68ea921fe05fe2cbc06bcae90ff615
refs/heads/master: fb9de91ea8035b99757d9f8a04aa058c982c361b
29 changes: 15 additions & 14 deletions trunk/net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,6 @@ static struct rt6_info *rt6_alloc_clone(struct rt6_info *ort, struct in6_addr *d
if (rt == &ip6_null_entry && strict) { \
while ((fn = fn->parent) != NULL) { \
if (fn->fn_flags & RTN_ROOT) { \
dst_hold(&rt->u.dst); \
goto out; \
} \
if (fn->fn_flags & RTN_RTINFO) \
Expand Down Expand Up @@ -508,17 +507,17 @@ void ip6_route_input(struct sk_buff *skb)
if ((rt->rt6i_flags & RTF_CACHE)) {
rt = rt6_device_match(rt, skb->dev->ifindex, strict);
BACKTRACK();
dst_hold(&rt->u.dst);
goto out;
}

rt = rt6_device_match(rt, skb->dev->ifindex, strict);
BACKTRACK();

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

if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP)) {
struct rt6_info *nrt;
dst_hold(&rt->u.dst);
read_unlock_bh(&rt6_lock);

nrt = rt6_cow(rt, &skb->nh.ipv6h->daddr,
&skb->nh.ipv6h->saddr,
Expand All @@ -536,14 +535,16 @@ void ip6_route_input(struct sk_buff *skb)
dst_release(&rt->u.dst);
goto relookup;
}
dst_hold(&rt->u.dst);

out:
read_unlock_bh(&rt6_lock);
out2:
rt->u.dst.lastuse = jiffies;
rt->u.dst.__use++;
skb->dst = (struct dst_entry *) rt;
return;
out:
dst_hold(&rt->u.dst);
read_unlock_bh(&rt6_lock);
goto out2;
}

struct dst_entry * ip6_route_output(struct sock *sk, struct flowi *fl)
Expand All @@ -566,7 +567,6 @@ struct dst_entry * ip6_route_output(struct sock *sk, struct flowi *fl)
if ((rt->rt6i_flags & RTF_CACHE)) {
rt = rt6_device_match(rt, fl->oif, strict);
BACKTRACK();
dst_hold(&rt->u.dst);
goto out;
}
if (rt->rt6i_flags & RTF_DEFAULT) {
Expand All @@ -577,10 +577,11 @@ struct dst_entry * ip6_route_output(struct sock *sk, struct flowi *fl)
BACKTRACK();
}

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

if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP)) {
struct rt6_info *nrt;
dst_hold(&rt->u.dst);
read_unlock_bh(&rt6_lock);

nrt = rt6_cow(rt, &fl->fl6_dst, &fl->fl6_src, NULL);

Expand All @@ -596,14 +597,14 @@ struct dst_entry * ip6_route_output(struct sock *sk, struct flowi *fl)
dst_release(&rt->u.dst);
goto relookup;
}
dst_hold(&rt->u.dst);

out:
read_unlock_bh(&rt6_lock);
out2:
rt->u.dst.lastuse = jiffies;
rt->u.dst.__use++;
return &rt->u.dst;
out:
dst_hold(&rt->u.dst);
read_unlock_bh(&rt6_lock);
goto out2;
}


Expand Down

0 comments on commit 237d386

Please sign in to comment.