aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-03 04:01:51 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-05 05:21:55 -0400
commit1d248b1cf4e09dbec8cef5f7fbeda5874248bd09 (patch)
treee65714ecde4e590dbadb01e94bd2cdbe5f3789c8 /net/ipv6/route.c
parentfccd7d5c77ff61d5283e7ce8242791d5f00dcc17 (diff)
net: Pass neighbours and dest address into NETEVENT_REDIRECT events.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 4b581c675bb2..34b29881e22d 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1687,6 +1687,7 @@ void rt6_redirect(const struct in6_addr *dest, const struct in6_addr *src,
1687 struct rt6_info *rt, *nrt = NULL; 1687 struct rt6_info *rt, *nrt = NULL;
1688 struct netevent_redirect netevent; 1688 struct netevent_redirect netevent;
1689 struct net *net = dev_net(neigh->dev); 1689 struct net *net = dev_net(neigh->dev);
1690 struct neighbour *old_neigh;
1690 1691
1691 rt = ip6_route_redirect(dest, src, saddr, neigh->dev); 1692 rt = ip6_route_redirect(dest, src, saddr, neigh->dev);
1692 1693
@@ -1714,7 +1715,8 @@ void rt6_redirect(const struct in6_addr *dest, const struct in6_addr *src,
1714 dst_confirm(&rt->dst); 1715 dst_confirm(&rt->dst);
1715 1716
1716 /* Duplicate redirect: silently ignore. */ 1717 /* Duplicate redirect: silently ignore. */
1717 if (neigh == dst_get_neighbour_noref_raw(&rt->dst)) 1718 old_neigh = dst_get_neighbour_noref_raw(&rt->dst);
1719 if (neigh == old_neigh)
1718 goto out; 1720 goto out;
1719 1721
1720 nrt = ip6_rt_copy(rt, dest); 1722 nrt = ip6_rt_copy(rt, dest);
@@ -1732,7 +1734,10 @@ void rt6_redirect(const struct in6_addr *dest, const struct in6_addr *src,
1732 goto out; 1734 goto out;
1733 1735
1734 netevent.old = &rt->dst; 1736 netevent.old = &rt->dst;
1737 netevent.old_neigh = old_neigh;
1735 netevent.new = &nrt->dst; 1738 netevent.new = &nrt->dst;
1739 netevent.new_neigh = neigh;
1740 netevent.daddr = dest;
1736 call_netevent_notifiers(NETEVENT_REDIRECT, &netevent); 1741 call_netevent_notifiers(NETEVENT_REDIRECT, &netevent);
1737 1742
1738 if (rt->rt6i_flags & RTF_CACHE) { 1743 if (rt->rt6i_flags & RTF_CACHE) {