Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22107
b: refs/heads/master
c: 95a9a5b
h: refs/heads/master
i:
  22105: 890d390
  22103: 97f22c1
v: v3
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Mar 21, 2006
1 parent c9104fd commit f987c03
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 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: c4fd30eb18666972230689eb30e8f90844bce635
refs/heads/master: 95a9a5ba0219a4d4237fb39703bfa58626c6fe72
32 changes: 21 additions & 11 deletions trunk/net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,9 @@ int ip6_ins_rt(struct rt6_info *rt, struct nlmsghdr *nlh,
with dst->error set to errno value.
*/

static struct rt6_info *rt6_cow(struct rt6_info *ort, struct in6_addr *daddr,
struct in6_addr *saddr, struct netlink_skb_parms *req)
static struct rt6_info *rt6_alloc_cow(struct rt6_info *ort, struct in6_addr *daddr,
struct in6_addr *saddr)
{
int err;
struct rt6_info *rt;

/*
Expand Down Expand Up @@ -435,18 +434,29 @@ static struct rt6_info *rt6_cow(struct rt6_info *ort, struct in6_addr *daddr,

rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway);

dst_hold(&rt->u.dst);
}

err = ip6_ins_rt(rt, NULL, NULL, req);
if (err == 0)
return rt;
return rt;
}

rt->u.dst.error = err;
static struct rt6_info *rt6_cow(struct rt6_info *ort, struct in6_addr *daddr,
struct in6_addr *saddr, struct netlink_skb_parms *req)
{
struct rt6_info *rt = rt6_alloc_cow(ort, daddr, saddr);
int err;

return rt;
if (!rt) {
dst_hold(&ip6_null_entry.u.dst);
return &ip6_null_entry;
}
dst_hold(&ip6_null_entry.u.dst);
return &ip6_null_entry;

dst_hold(&rt->u.dst);

err = ip6_ins_rt(rt, NULL, NULL, req);
if (err)
rt->u.dst.error = err;

return rt;
}

#define BACKTRACK() \
Expand Down

0 comments on commit f987c03

Please sign in to comment.