diff options
author | Eric Dumazet <edumazet@google.com> | 2015-03-17 00:06:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-17 15:18:00 -0400 |
commit | 1bfc4438a7ef99e8a6cba0bd3a86249430256621 (patch) | |
tree | 63db06a89283e694e3ff7d01e9bf05fa522f12a8 /net/ipv4/tcp_input.c | |
parent | adc17d6a6ca08d11f70f6c49f3d40b87b68fe53f (diff) |
tcp: move tcp_openreq_init() to tcp_input.c
This big helper is called once from tcp_conn_request(), there is no
point having it in an include. Compiler will inline it anyway.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 717d437b6ce1..10d6bd93f229 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -5912,6 +5912,31 @@ static void tcp_ecn_create_request(struct request_sock *req, | |||
5912 | inet_rsk(req)->ecn_ok = 1; | 5912 | inet_rsk(req)->ecn_ok = 1; |
5913 | } | 5913 | } |
5914 | 5914 | ||
5915 | static void tcp_openreq_init(struct request_sock *req, | ||
5916 | const struct tcp_options_received *rx_opt, | ||
5917 | struct sk_buff *skb, const struct sock *sk) | ||
5918 | { | ||
5919 | struct inet_request_sock *ireq = inet_rsk(req); | ||
5920 | |||
5921 | req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */ | ||
5922 | req->cookie_ts = 0; | ||
5923 | tcp_rsk(req)->rcv_isn = TCP_SKB_CB(skb)->seq; | ||
5924 | tcp_rsk(req)->rcv_nxt = TCP_SKB_CB(skb)->seq + 1; | ||
5925 | tcp_rsk(req)->snt_synack = tcp_time_stamp; | ||
5926 | tcp_rsk(req)->last_oow_ack_time = 0; | ||
5927 | req->mss = rx_opt->mss_clamp; | ||
5928 | req->ts_recent = rx_opt->saw_tstamp ? rx_opt->rcv_tsval : 0; | ||
5929 | ireq->tstamp_ok = rx_opt->tstamp_ok; | ||
5930 | ireq->sack_ok = rx_opt->sack_ok; | ||
5931 | ireq->snd_wscale = rx_opt->snd_wscale; | ||
5932 | ireq->wscale_ok = rx_opt->wscale_ok; | ||
5933 | ireq->acked = 0; | ||
5934 | ireq->ecn_ok = 0; | ||
5935 | ireq->ir_rmt_port = tcp_hdr(skb)->source; | ||
5936 | ireq->ir_num = ntohs(tcp_hdr(skb)->dest); | ||
5937 | ireq->ir_mark = inet_request_mark(sk, skb); | ||
5938 | } | ||
5939 | |||
5915 | int tcp_conn_request(struct request_sock_ops *rsk_ops, | 5940 | int tcp_conn_request(struct request_sock_ops *rsk_ops, |
5916 | const struct tcp_request_sock_ops *af_ops, | 5941 | const struct tcp_request_sock_ops *af_ops, |
5917 | struct sock *sk, struct sk_buff *skb) | 5942 | struct sock *sk, struct sk_buff *skb) |