diff options
Diffstat (limited to 'net/ipv6/inet6_connection_sock.c')
-rw-r--r-- | net/ipv6/inet6_connection_sock.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index 0251a6005be8..c4f934176cab 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c | |||
@@ -175,33 +175,12 @@ void __inet6_csk_dst_store(struct sock *sk, struct dst_entry *dst, | |||
175 | const struct in6_addr *saddr) | 175 | const struct in6_addr *saddr) |
176 | { | 176 | { |
177 | __ip6_dst_store(sk, dst, daddr, saddr); | 177 | __ip6_dst_store(sk, dst, daddr, saddr); |
178 | |||
179 | #ifdef CONFIG_XFRM | ||
180 | { | ||
181 | struct rt6_info *rt = (struct rt6_info *)dst; | ||
182 | rt->rt6i_flow_cache_genid = atomic_read(&flow_cache_genid); | ||
183 | } | ||
184 | #endif | ||
185 | } | 178 | } |
186 | 179 | ||
187 | static inline | 180 | static inline |
188 | struct dst_entry *__inet6_csk_dst_check(struct sock *sk, u32 cookie) | 181 | struct dst_entry *__inet6_csk_dst_check(struct sock *sk, u32 cookie) |
189 | { | 182 | { |
190 | struct dst_entry *dst; | 183 | return __sk_dst_check(sk, cookie); |
191 | |||
192 | dst = __sk_dst_check(sk, cookie); | ||
193 | |||
194 | #ifdef CONFIG_XFRM | ||
195 | if (dst) { | ||
196 | struct rt6_info *rt = (struct rt6_info *)dst; | ||
197 | if (rt->rt6i_flow_cache_genid != atomic_read(&flow_cache_genid)) { | ||
198 | __sk_dst_reset(sk); | ||
199 | dst = NULL; | ||
200 | } | ||
201 | } | ||
202 | #endif | ||
203 | |||
204 | return dst; | ||
205 | } | 184 | } |
206 | 185 | ||
207 | static struct dst_entry *inet6_csk_route_socket(struct sock *sk, | 186 | static struct dst_entry *inet6_csk_route_socket(struct sock *sk, |