Skip to content

Commit

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

extern int ip6_rt_addr_add(struct in6_addr *addr,
struct net_device *dev,
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)

if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) {
if (onlink == 0) {
ip6_del_rt(rt, NULL, NULL, NULL);
ip6_del_rt(rt);
rt = NULL;
} else if (!(rt->rt6i_flags & RTF_EXPIRES)) {
rt->rt6i_expires = expires;
Expand Down Expand Up @@ -1662,7 +1662,7 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len)
if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) {
if (rt->rt6i_flags&RTF_EXPIRES) {
if (valid_lft == 0) {
ip6_del_rt(rt, NULL, NULL, NULL);
ip6_del_rt(rt);
rt = NULL;
} else {
rt->rt6i_expires = jiffies + rt_expires;
Expand Down Expand Up @@ -3557,7 +3557,7 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
addrconf_leave_anycast(ifp);
addrconf_leave_solict(ifp->idev, &ifp->addr);
dst_hold(&ifp->rt->u.dst);
if (ip6_del_rt(ifp->rt, NULL, NULL, NULL))
if (ip6_del_rt(ifp->rt))
dst_free(&ifp->rt->u.dst);
break;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/ipv6/ndisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ static void ndisc_recv_na(struct sk_buff *skb)
struct rt6_info *rt;
rt = rt6_get_dflt_router(saddr, dev);
if (rt)
ip6_del_rt(rt, NULL, NULL, NULL);
ip6_del_rt(rt);
}

out:
Expand Down Expand Up @@ -1114,7 +1114,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)

if (rt && lifetime == 0) {
neigh_clone(neigh);
ip6_del_rt(rt, NULL, NULL, NULL);
ip6_del_rt(rt);
rt = NULL;
}

Expand Down
18 changes: 12 additions & 6 deletions trunk/net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ int rt6_route_rcv(struct net_device *dev, u8 *opt, int len,
rt = rt6_get_route_info(prefix, rinfo->prefix_len, gwaddr, dev->ifindex);

if (rt && !lifetime) {
ip6_del_rt(rt, NULL, NULL, NULL);
ip6_del_rt(rt);
rt = NULL;
}

Expand Down Expand Up @@ -813,7 +813,7 @@ static struct dst_entry *ip6_negative_advice(struct dst_entry *dst)

if (rt) {
if (rt->rt6i_flags & RTF_CACHE)
ip6_del_rt(rt, NULL, NULL, NULL);
ip6_del_rt(rt);
else
dst_release(dst);
}
Expand Down Expand Up @@ -1218,7 +1218,8 @@ int ip6_route_add(struct in6_rtmsg *rtmsg, struct nlmsghdr *nlh,
return err;
}

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

int ip6_del_rt(struct rt6_info *rt)
{
return __ip6_del_rt(rt, NULL, NULL, NULL);
}

static int ip6_route_del(struct in6_rtmsg *rtmsg, struct nlmsghdr *nlh,
void *_rtattr, struct netlink_skb_parms *req,
u32 table_id)
Expand Down Expand Up @@ -1271,7 +1277,7 @@ static int ip6_route_del(struct in6_rtmsg *rtmsg, struct nlmsghdr *nlh,
dst_hold(&rt->u.dst);
read_unlock_bh(&table->tb6_lock);

return ip6_del_rt(rt, nlh, _rtattr, req);
return __ip6_del_rt(rt, nlh, _rtattr, req);
}
}
read_unlock_bh(&table->tb6_lock);
Expand Down Expand Up @@ -1395,7 +1401,7 @@ void rt6_redirect(struct in6_addr *dest, struct in6_addr *saddr,
call_netevent_notifiers(NETEVENT_REDIRECT, &netevent);

if (rt->rt6i_flags&RTF_CACHE) {
ip6_del_rt(rt, NULL, NULL, NULL);
ip6_del_rt(rt);
return;
}

Expand Down Expand Up @@ -1631,7 +1637,7 @@ void rt6_purge_dflt_routers(void)
if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) {
dst_hold(&rt->u.dst);
read_unlock_bh(&table->tb6_lock);
ip6_del_rt(rt, NULL, NULL, NULL);
ip6_del_rt(rt);
goto restart;
}
}
Expand Down

0 comments on commit 49b4e1d

Please sign in to comment.