diff options
author | Julian Anastasov <ja@ssi.bg> | 2013-10-20 08:43:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-21 18:37:01 -0400 |
commit | 550bab42f83308c9d6ab04a980cc4333cef1c8fa (patch) | |
tree | 254a9840e9ca6cbe13815443b9b8bd1c2ae54b47 /include | |
parent | 96dc809514fb2328605198a0602b67554d8cce7b (diff) |
ipv6: fill rt6i_gateway with nexthop address
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/ip6_route.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 481404abdf65..2b786b7e3585 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) | |||
194 | skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb)); | 194 | skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb)); |
195 | } | 195 | } |
196 | 196 | ||
197 | static inline struct in6_addr *rt6_nexthop(struct rt6_info *rt, struct in6_addr *dest) | 197 | static inline struct in6_addr *rt6_nexthop(struct rt6_info *rt) |
198 | { | 198 | { |
199 | if (rt->rt6i_flags & RTF_GATEWAY || !ipv6_addr_any(&rt->rt6i_gateway)) | 199 | return &rt->rt6i_gateway; |
200 | return &rt->rt6i_gateway; | ||
201 | return dest; | ||
202 | } | 200 | } |
203 | 201 | ||
204 | #endif | 202 | #endif |