summaryrefslogtreecommitdiff
path: root/include/net/ip6_fib.h
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2015-05-23 06:56:03 +0300
committerDavid S. Miller <davem@davemloft.net>2015-05-25 20:25:34 +0300
commit3da59bd94583d1239e4fbdee452265a160b9cd71 (patch)
treeb78147954d2bc53e4f45aec22240d2ef55e2d722 /include/net/ip6_fib.h
parent48e8aa6e3137692d38f20e8bfff100e408c6bc53 (diff)
downloadlinux-3da59bd94583d1239e4fbdee452265a160b9cd71.tar.xz
ipv6: Create RTF_CACHE clone when FLOWI_FLAG_KNOWN_NH is set
This patch always creates RTF_CACHE clone with DST_NOCACHE when FLOWI_FLAG_KNOWN_NH is set so that the rt6i_dst is set to the fl6->daddr. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Julian Anastasov <ja@ssi.bg> Tested-by: Julian Anastasov <ja@ssi.bg> Cc: Hannes Frederic Sowa <hannes@stressinduktion.org> Cc: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip6_fib.h')
-rw-r--r--include/net/ip6_fib.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index a4bece6797da..5556111022eb 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -161,6 +161,9 @@ static inline void rt6_update_expires(struct rt6_info *rt0, int timeout)
static inline u32 rt6_get_cookie(const struct rt6_info *rt)
{
+ if (unlikely(rt->dst.flags & DST_NOCACHE))
+ rt = (struct rt6_info *)(rt->dst.from);
+
return rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0;
}