diff options
author | Octavian Purdila <octavian.purdila@intel.com> | 2014-06-25 10:09:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-27 18:53:36 -0400 |
commit | 936b8bdb53f90840e658904530f9db8d02ac804b (patch) | |
tree | e3886a46d0391a200db08fac4257fc64020990e5 /net/ipv4 | |
parent | 9403715977075c89b1dbcdd7713ab542807a04ac (diff) |
tcp: add init_seq method to tcp_request_sock_ops
More work in preparation of unifying tcp_v4_conn_request and
tcp_v6_conn_request: indirect the init sequence calls via the
tcp_request_sock_ops.
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 54fbbd8b4fcd..43478265006a 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -99,7 +99,7 @@ static int tcp_v4_md5_hash_hdr(char *md5_hash, const struct tcp_md5sig_key *key, | |||
99 | struct inet_hashinfo tcp_hashinfo; | 99 | struct inet_hashinfo tcp_hashinfo; |
100 | EXPORT_SYMBOL(tcp_hashinfo); | 100 | EXPORT_SYMBOL(tcp_hashinfo); |
101 | 101 | ||
102 | static inline __u32 tcp_v4_init_sequence(const struct sk_buff *skb) | 102 | static __u32 tcp_v4_init_sequence(const struct sk_buff *skb) |
103 | { | 103 | { |
104 | return secure_tcp_sequence_number(ip_hdr(skb)->daddr, | 104 | return secure_tcp_sequence_number(ip_hdr(skb)->daddr, |
105 | ip_hdr(skb)->saddr, | 105 | ip_hdr(skb)->saddr, |
@@ -1284,6 +1284,7 @@ static const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = { | |||
1284 | .cookie_init_seq = cookie_v4_init_sequence, | 1284 | .cookie_init_seq = cookie_v4_init_sequence, |
1285 | #endif | 1285 | #endif |
1286 | .route_req = tcp_v4_route_req, | 1286 | .route_req = tcp_v4_route_req, |
1287 | .init_seq = tcp_v4_init_sequence, | ||
1287 | }; | 1288 | }; |
1288 | 1289 | ||
1289 | int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | 1290 | int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) |
@@ -1391,7 +1392,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1391 | goto drop_and_release; | 1392 | goto drop_and_release; |
1392 | } | 1393 | } |
1393 | 1394 | ||
1394 | isn = tcp_v4_init_sequence(skb); | 1395 | isn = af_ops->init_seq(skb); |
1395 | } | 1396 | } |
1396 | if (!dst) { | 1397 | if (!dst) { |
1397 | dst = af_ops->route_req(sk, (struct flowi *)&fl4, req, NULL); | 1398 | dst = af_ops->route_req(sk, (struct flowi *)&fl4, req, NULL); |