diff options
Diffstat (limited to 'include/net/ip6_route.h')
-rw-r--r-- | include/net/ip6_route.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 2bfb2ad2fab1..877f682989b8 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -133,27 +133,18 @@ void rt6_clean_tohost(struct net *net, struct in6_addr *gateway); | |||
133 | /* | 133 | /* |
134 | * Store a destination cache entry in a socket | 134 | * Store a destination cache entry in a socket |
135 | */ | 135 | */ |
136 | static inline void __ip6_dst_store(struct sock *sk, struct dst_entry *dst, | 136 | static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst, |
137 | const struct in6_addr *daddr, | 137 | const struct in6_addr *daddr, |
138 | const struct in6_addr *saddr) | 138 | const struct in6_addr *saddr) |
139 | { | 139 | { |
140 | struct ipv6_pinfo *np = inet6_sk(sk); | 140 | struct ipv6_pinfo *np = inet6_sk(sk); |
141 | struct rt6_info *rt = (struct rt6_info *) dst; | ||
142 | 141 | ||
142 | np->dst_cookie = rt6_get_cookie((struct rt6_info *)dst); | ||
143 | sk_setup_caps(sk, dst); | 143 | sk_setup_caps(sk, dst); |
144 | np->daddr_cache = daddr; | 144 | np->daddr_cache = daddr; |
145 | #ifdef CONFIG_IPV6_SUBTREES | 145 | #ifdef CONFIG_IPV6_SUBTREES |
146 | np->saddr_cache = saddr; | 146 | np->saddr_cache = saddr; |
147 | #endif | 147 | #endif |
148 | np->dst_cookie = rt6_get_cookie(rt); | ||
149 | } | ||
150 | |||
151 | static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst, | ||
152 | struct in6_addr *daddr, struct in6_addr *saddr) | ||
153 | { | ||
154 | spin_lock(&sk->sk_dst_lock); | ||
155 | __ip6_dst_store(sk, dst, daddr, saddr); | ||
156 | spin_unlock(&sk->sk_dst_lock); | ||
157 | } | 148 | } |
158 | 149 | ||
159 | static inline bool ipv6_unicast_destination(const struct sk_buff *skb) | 150 | static inline bool ipv6_unicast_destination(const struct sk_buff *skb) |