diff options
| author | Octavian Purdila <[email protected]> | 2014-06-25 14:09:54 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2014-06-27 22:53:35 +0000 |
| commit | fb7b37a7f3d6f7b7ba05ee526fee96810d5b92a8 (patch) | |
| tree | 9749a1ad29bee83b3adaaa41759e9c6b72536691 /net/ipv6/tcp_ipv6.c | |
| parent | tcp: add init_req method to tcp_request_sock_ops (diff) | |
| download | kernel-fb7b37a7f3d6f7b7ba05ee526fee96810d5b92a8.tar.gz kernel-fb7b37a7f3d6f7b7ba05ee526fee96810d5b92a8.zip | |
tcp: add init_cookie_seq method to tcp_request_sock_ops
Move the specific IPv4/IPv6 cookie sequence initialization to a new
method in tcp_request_sock_ops in preparation for unifying
tcp_v4_conn_request and tcp_v6_conn_request.
Signed-off-by: Octavian Purdila <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
| -rw-r--r-- | net/ipv6/tcp_ipv6.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 87a360c3eba9..17710cffddaa 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -761,6 +761,9 @@ static const struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = { .calc_md5_hash = tcp_v6_md5_hash_skb, #endif .init_req = tcp_v6_init_req, +#ifdef CONFIG_SYN_COOKIES + .cookie_init_seq = cookie_v6_init_sequence, +#endif }; static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win, @@ -1061,7 +1064,7 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) if (!isn) { if (want_cookie) { - isn = cookie_v6_init_sequence(sk, skb, &req->mss); + isn = cookie_init_sequence(af_ops, sk, skb, &req->mss); req->cookie_ts = tmp_opt.tstamp_ok; goto have_isn; } |
