diff options
author | Eric Dumazet <edumazet@google.com> | 2012-08-06 01:09:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-06 16:33:21 -0400 |
commit | 5d299f3d3c8a2fbc732b1bf03af36333ccec3130 (patch) | |
tree | 119701591725281d99ecad6f459166da3e6034a2 /include | |
parent | b5497eeb37d7d4a5a61b91f64efedc90d1ad6fa3 (diff) |
net: ipv6: fix TCP early demux
IPv6 needs a cookie in dst_check() call.
We need to add rx_dst_cookie and provide a family independent
sk_rx_dst_set(sk, skb) method to properly support IPv6 TCP early demux.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ipv6.h | 1 | ||||
-rw-r--r-- | include/net/inet_connection_sock.h | 1 | ||||
-rw-r--r-- | include/net/inet_sock.h | 9 |
3 files changed, 2 insertions, 9 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 379e433e15e0..879db26ec401 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -369,6 +369,7 @@ struct ipv6_pinfo { | |||
369 | __u8 rcv_tclass; | 369 | __u8 rcv_tclass; |
370 | 370 | ||
371 | __u32 dst_cookie; | 371 | __u32 dst_cookie; |
372 | __u32 rx_dst_cookie; | ||
372 | 373 | ||
373 | struct ipv6_mc_socklist __rcu *ipv6_mc_list; | 374 | struct ipv6_mc_socklist __rcu *ipv6_mc_list; |
374 | struct ipv6_ac_socklist *ipv6_ac_list; | 375 | struct ipv6_ac_socklist *ipv6_ac_list; |
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 5ee66f517b4f..ba1d3615acbb 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
@@ -39,6 +39,7 @@ struct inet_connection_sock_af_ops { | |||
39 | int (*queue_xmit)(struct sk_buff *skb, struct flowi *fl); | 39 | int (*queue_xmit)(struct sk_buff *skb, struct flowi *fl); |
40 | void (*send_check)(struct sock *sk, struct sk_buff *skb); | 40 | void (*send_check)(struct sock *sk, struct sk_buff *skb); |
41 | int (*rebuild_header)(struct sock *sk); | 41 | int (*rebuild_header)(struct sock *sk); |
42 | void (*sk_rx_dst_set)(struct sock *sk, const struct sk_buff *skb); | ||
42 | int (*conn_request)(struct sock *sk, struct sk_buff *skb); | 43 | int (*conn_request)(struct sock *sk, struct sk_buff *skb); |
43 | struct sock *(*syn_recv_sock)(struct sock *sk, struct sk_buff *skb, | 44 | struct sock *(*syn_recv_sock)(struct sock *sk, struct sk_buff *skb, |
44 | struct request_sock *req, | 45 | struct request_sock *req, |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 83b567fe1941..613cfa401672 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -249,13 +249,4 @@ static inline __u8 inet_sk_flowi_flags(const struct sock *sk) | |||
249 | return flags; | 249 | return flags; |
250 | } | 250 | } |
251 | 251 | ||
252 | static inline void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) | ||
253 | { | ||
254 | struct dst_entry *dst = skb_dst(skb); | ||
255 | |||
256 | dst_hold(dst); | ||
257 | sk->sk_rx_dst = dst; | ||
258 | inet_sk(sk)->rx_dst_ifindex = skb->skb_iif; | ||
259 | } | ||
260 | |||
261 | #endif /* _INET_SOCK_H */ | 252 | #endif /* _INET_SOCK_H */ |