diff options
author | Martin KaFai Lau <kafai@fb.com> | 2015-05-23 05:56:03 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-25 19:25:34 +0200 |
commit | 3da59bd94583d1239e4fbdee452265a160b9cd71 (patch) | |
tree | b78147954d2bc53e4f45aec22240d2ef55e2d722 /include/net/ip6_fib.h | |
parent | ipv6: Set FLOWI_FLAG_KNOWN_NH at flowi6_flags (diff) | |
download | linux-3da59bd94583d1239e4fbdee452265a160b9cd71.tar.xz linux-3da59bd94583d1239e4fbdee452265a160b9cd71.zip |
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.h | 3 |
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; } |