diff options
author | Thomas Graf <tgraf@suug.ch> | 2006-08-22 03:00:21 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 17:55:11 -0400 |
commit | e0a1ad73d34fd6dfdb630479400511e9879069c0 (patch) | |
tree | eda7611d42a7184131056e08b0bfb13d18b0e24e /net/ipv6/addrconf.c | |
parent | e9ce1cd3cf6cf35b21d0ce990f2e738f35907386 (diff) |
[IPv6] route: Simplify ip6_del_rt()
Provide a simple ip6_del_rt() for the majority of users and
an alternative for the exception via netlink. Avoids code
obfuscation.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index f1ede9004887..27f2e3309598 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -736,7 +736,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) | |||
736 | 736 | ||
737 | if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) { | 737 | if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) { |
738 | if (onlink == 0) { | 738 | if (onlink == 0) { |
739 | ip6_del_rt(rt, NULL, NULL, NULL); | 739 | ip6_del_rt(rt); |
740 | rt = NULL; | 740 | rt = NULL; |
741 | } else if (!(rt->rt6i_flags & RTF_EXPIRES)) { | 741 | } else if (!(rt->rt6i_flags & RTF_EXPIRES)) { |
742 | rt->rt6i_expires = expires; | 742 | rt->rt6i_expires = expires; |
@@ -1662,7 +1662,7 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len) | |||
1662 | if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) { | 1662 | if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) { |
1663 | if (rt->rt6i_flags&RTF_EXPIRES) { | 1663 | if (rt->rt6i_flags&RTF_EXPIRES) { |
1664 | if (valid_lft == 0) { | 1664 | if (valid_lft == 0) { |
1665 | ip6_del_rt(rt, NULL, NULL, NULL); | 1665 | ip6_del_rt(rt); |
1666 | rt = NULL; | 1666 | rt = NULL; |
1667 | } else { | 1667 | } else { |
1668 | rt->rt6i_expires = jiffies + rt_expires; | 1668 | rt->rt6i_expires = jiffies + rt_expires; |
@@ -3557,7 +3557,7 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) | |||
3557 | addrconf_leave_anycast(ifp); | 3557 | addrconf_leave_anycast(ifp); |
3558 | addrconf_leave_solict(ifp->idev, &ifp->addr); | 3558 | addrconf_leave_solict(ifp->idev, &ifp->addr); |
3559 | dst_hold(&ifp->rt->u.dst); | 3559 | dst_hold(&ifp->rt->u.dst); |
3560 | if (ip6_del_rt(ifp->rt, NULL, NULL, NULL)) | 3560 | if (ip6_del_rt(ifp->rt)) |
3561 | dst_free(&ifp->rt->u.dst); | 3561 | dst_free(&ifp->rt->u.dst); |
3562 | break; | 3562 | break; |
3563 | } | 3563 | } |