diff options
-rw-r--r-- | include/linux/dccp.h | 2 | ||||
-rw-r--r-- | include/net/request_sock.h | 3 | ||||
-rw-r--r-- | include/net/tcp.h | 2 | ||||
-rw-r--r-- | net/dccp/ipv4.c | 2 | ||||
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_timer.c | 8 |
6 files changed, 10 insertions, 9 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 439ff698000a..3dca24d3ac67 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
@@ -317,6 +317,6 @@ static inline const char *dccp_role(const struct sock *sk) | |||
317 | return NULL; | 317 | return NULL; |
318 | } | 318 | } |
319 | 319 | ||
320 | extern void dccp_syn_ack_timeout(struct sock *sk, struct request_sock *req); | 320 | extern void dccp_syn_ack_timeout(const struct request_sock *req); |
321 | 321 | ||
322 | #endif /* _LINUX_DCCP_H */ | 322 | #endif /* _LINUX_DCCP_H */ |
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index 6a91261d9b7b..8603c350fad0 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -39,8 +39,7 @@ struct request_sock_ops { | |||
39 | void (*send_reset)(struct sock *sk, | 39 | void (*send_reset)(struct sock *sk, |
40 | struct sk_buff *skb); | 40 | struct sk_buff *skb); |
41 | void (*destructor)(struct request_sock *req); | 41 | void (*destructor)(struct request_sock *req); |
42 | void (*syn_ack_timeout)(struct sock *sk, | 42 | void (*syn_ack_timeout)(const struct request_sock *req); |
43 | struct request_sock *req); | ||
44 | }; | 43 | }; |
45 | 44 | ||
46 | int inet_rtx_syn_ack(struct sock *parent, struct request_sock *req); | 45 | int inet_rtx_syn_ack(struct sock *parent, struct request_sock *req); |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 082fd79132b7..1876262afd59 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -433,7 +433,7 @@ int compat_tcp_getsockopt(struct sock *sk, int level, int optname, | |||
433 | int compat_tcp_setsockopt(struct sock *sk, int level, int optname, | 433 | int compat_tcp_setsockopt(struct sock *sk, int level, int optname, |
434 | char __user *optval, unsigned int optlen); | 434 | char __user *optval, unsigned int optlen); |
435 | void tcp_set_keepalive(struct sock *sk, int val); | 435 | void tcp_set_keepalive(struct sock *sk, int val); |
436 | void tcp_syn_ack_timeout(struct sock *sk, struct request_sock *req); | 436 | void tcp_syn_ack_timeout(const struct request_sock *req); |
437 | int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock, | 437 | int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock, |
438 | int flags, int *addr_len); | 438 | int flags, int *addr_len); |
439 | void tcp_parse_options(const struct sk_buff *skb, | 439 | void tcp_parse_options(const struct sk_buff *skb, |
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 25a9615b3b88..1f7161e05403 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -576,7 +576,7 @@ static void dccp_v4_reqsk_destructor(struct request_sock *req) | |||
576 | kfree(inet_rsk(req)->opt); | 576 | kfree(inet_rsk(req)->opt); |
577 | } | 577 | } |
578 | 578 | ||
579 | void dccp_syn_ack_timeout(struct sock *sk, struct request_sock *req) | 579 | void dccp_syn_ack_timeout(const struct request_sock *req) |
580 | { | 580 | { |
581 | } | 581 | } |
582 | EXPORT_SYMBOL(dccp_syn_ack_timeout); | 582 | EXPORT_SYMBOL(dccp_syn_ack_timeout); |
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 7d011e825c48..a12b973164d0 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -615,7 +615,7 @@ static void reqsk_timer_handler(unsigned long data) | |||
615 | max_retries = defer_accept; | 615 | max_retries = defer_accept; |
616 | syn_ack_recalc(req, thresh, max_retries, defer_accept, | 616 | syn_ack_recalc(req, thresh, max_retries, defer_accept, |
617 | &expire, &resend); | 617 | &expire, &resend); |
618 | req->rsk_ops->syn_ack_timeout(sk_listener, req); | 618 | req->rsk_ops->syn_ack_timeout(req); |
619 | if (!expire && | 619 | if (!expire && |
620 | (!resend || | 620 | (!resend || |
621 | !inet_rtx_syn_ack(sk_listener, req) || | 621 | !inet_rtx_syn_ack(sk_listener, req) || |
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 3daa6b5d766d..2568fd282873 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -327,7 +327,7 @@ static void tcp_fastopen_synack_timer(struct sock *sk) | |||
327 | struct request_sock *req; | 327 | struct request_sock *req; |
328 | 328 | ||
329 | req = tcp_sk(sk)->fastopen_rsk; | 329 | req = tcp_sk(sk)->fastopen_rsk; |
330 | req->rsk_ops->syn_ack_timeout(sk, req); | 330 | req->rsk_ops->syn_ack_timeout(req); |
331 | 331 | ||
332 | if (req->num_timeout >= max_retries) { | 332 | if (req->num_timeout >= max_retries) { |
333 | tcp_write_err(sk); | 333 | tcp_write_err(sk); |
@@ -539,9 +539,11 @@ static void tcp_write_timer(unsigned long data) | |||
539 | sock_put(sk); | 539 | sock_put(sk); |
540 | } | 540 | } |
541 | 541 | ||
542 | void tcp_syn_ack_timeout(struct sock *sk, struct request_sock *req) | 542 | void tcp_syn_ack_timeout(const struct request_sock *req) |
543 | { | 543 | { |
544 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPTIMEOUTS); | 544 | struct net *net = read_pnet(&inet_rsk(req)->ireq_net); |
545 | |||
546 | NET_INC_STATS_BH(net, LINUX_MIB_TCPTIMEOUTS); | ||
545 | } | 547 | } |
546 | EXPORT_SYMBOL(tcp_syn_ack_timeout); | 548 | EXPORT_SYMBOL(tcp_syn_ack_timeout); |
547 | 549 | ||