summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2013-10-20 15:43:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-04 04:31:05 -0800
commit044d6efb797bfa1131bfb510102505ba41bfec52 (patch)
treec184240bec3b579c6e7cdad661dc8b83e8b88149 /include
parent208a6152b633a33722cc53bca47c46b79e88a2ad (diff)
downloadlinux-3.10-044d6efb797bfa1131bfb510102505ba41bfec52.tar.gz
linux-3.10-044d6efb797bfa1131bfb510102505ba41bfec52.tar.bz2
linux-3.10-044d6efb797bfa1131bfb510102505ba41bfec52.zip
ipv6: fill rt6i_gateway with nexthop address
[ Upstream commit 550bab42f83308c9d6ab04a980cc4333cef1c8fa ] Make sure rt6i_gateway contains nexthop information in all routes returned from lookup or when routes are directly attached to skb for generated ICMP packets. The effect of this patch should be a faster version of rt6_nexthop() and the consideration of local addresses as nexthop. Signed-off-by: Julian Anastasov <ja@ssi.bg> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/ip6_route.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 5cba2302a7a..b906f4a131a 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -194,11 +194,9 @@ static inline int ip6_skb_dst_mtu(struct sk_buff *skb)
skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb));
}
-static inline struct in6_addr *rt6_nexthop(struct rt6_info *rt, struct in6_addr *dest)
+static inline struct in6_addr *rt6_nexthop(struct rt6_info *rt)
{
- if (rt->rt6i_flags & RTF_GATEWAY || !ipv6_addr_any(&rt->rt6i_gateway))
- return &rt->rt6i_gateway;
- return dest;
+ return &rt->rt6i_gateway;
}
#endif