Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34508
b: refs/heads/master
c: 40e22e8
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Graf authored and David S. Miller committed Sep 22, 2006
1 parent 49b4e1d commit 0b0b2bb
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 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: e0a1ad73d34fd6dfdb630479400511e9879069c0
refs/heads/master: 40e22e8f3d4d4f1ff68fb03683f007c53ee8b348
5 changes: 1 addition & 4 deletions trunk/include/net/ip6_route.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ extern int ip6_route_add(struct in6_rtmsg *rtmsg,
void *rtattr,
struct netlink_skb_parms *req,
u32 table_id);
extern int ip6_ins_rt(struct rt6_info *,
struct nlmsghdr *,
void *rtattr,
struct netlink_skb_parms *req);
extern int ip6_ins_rt(struct rt6_info *);
extern int ip6_del_rt(struct rt6_info *);

extern int ip6_rt_addr_add(struct in6_addr *addr,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3548,7 +3548,7 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)

switch (event) {
case RTM_NEWADDR:
ip6_ins_rt(ifp->rt, NULL, NULL, NULL);
ip6_ins_rt(ifp->rt);
if (ifp->idev->cnf.forwarding)
addrconf_join_anycast(ifp);
break;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv6/anycast.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ int ipv6_dev_ac_inc(struct net_device *dev, struct in6_addr *addr)
write_unlock_bh(&idev->lock);

dst_hold(&rt->u.dst);
if (ip6_ins_rt(rt, NULL, NULL, NULL))
if (ip6_ins_rt(rt))
dst_release(&rt->u.dst);

addrconf_join_solict(dev, &aca->aca_addr);
Expand Down
19 changes: 12 additions & 7 deletions trunk/net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,8 @@ struct rt6_info *rt6_lookup(struct in6_addr *daddr, struct in6_addr *saddr,
be destroyed.
*/

int ip6_ins_rt(struct rt6_info *rt, struct nlmsghdr *nlh,
void *_rtattr, struct netlink_skb_parms *req)
static int __ip6_ins_rt(struct rt6_info *rt, struct nlmsghdr *nlh,
void *_rtattr, struct netlink_skb_parms *req)
{
int err;
struct fib6_table *table;
Expand All @@ -560,6 +560,11 @@ int ip6_ins_rt(struct rt6_info *rt, struct nlmsghdr *nlh,
return err;
}

int ip6_ins_rt(struct rt6_info *rt)
{
return __ip6_ins_rt(rt, NULL, NULL, NULL);
}

static struct rt6_info *rt6_alloc_cow(struct rt6_info *ort, struct in6_addr *daddr,
struct in6_addr *saddr)
{
Expand Down Expand Up @@ -657,7 +662,7 @@ static struct rt6_info *ip6_pol_route_input(struct fib6_table *table,

dst_hold(&rt->u.dst);
if (nrt) {
err = ip6_ins_rt(nrt, NULL, NULL, NULL);
err = ip6_ins_rt(nrt);
if (!err)
goto out2;
}
Expand Down Expand Up @@ -752,7 +757,7 @@ static struct rt6_info *ip6_pol_route_output(struct fib6_table *table,

dst_hold(&rt->u.dst);
if (nrt) {
err = ip6_ins_rt(nrt, NULL, NULL, NULL);
err = ip6_ins_rt(nrt);
if (!err)
goto out2;
}
Expand Down Expand Up @@ -1206,7 +1211,7 @@ int ip6_route_add(struct in6_rtmsg *rtmsg, struct nlmsghdr *nlh,
rt->u.dst.dev = dev;
rt->rt6i_idev = idev;
rt->rt6i_table = table;
return ip6_ins_rt(rt, nlh, _rtattr, req);
return __ip6_ins_rt(rt, nlh, _rtattr, req);

out:
if (dev)
Expand Down Expand Up @@ -1393,7 +1398,7 @@ void rt6_redirect(struct in6_addr *dest, struct in6_addr *saddr,
nrt->u.dst.metrics[RTAX_MTU-1] = ipv6_get_mtu(neigh->dev);
nrt->u.dst.metrics[RTAX_ADVMSS-1] = ipv6_advmss(dst_mtu(&nrt->u.dst));

if (ip6_ins_rt(nrt, NULL, NULL, NULL))
if (ip6_ins_rt(nrt))
goto out;

netevent.old = &rt->u.dst;
Expand Down Expand Up @@ -1483,7 +1488,7 @@ void rt6_pmtu_discovery(struct in6_addr *daddr, struct in6_addr *saddr,
dst_set_expires(&nrt->u.dst, ip6_rt_mtu_expires);
nrt->rt6i_flags |= RTF_DYNAMIC|RTF_EXPIRES;

ip6_ins_rt(nrt, NULL, NULL, NULL);
ip6_ins_rt(nrt);
}
out:
dst_release(&rt->u.dst);
Expand Down

0 comments on commit 0b0b2bb

Please sign in to comment.