summaryrefslogtreecommitdiffstats
path: root/net/dccp/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/timer.c')
-rw-r--r--net/dccp/timer.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/net/dccp/timer.c b/net/dccp/timer.c
index 1cd46a345cb0..3ef7acef3ce8 100644
--- a/net/dccp/timer.c
+++ b/net/dccp/timer.c
@@ -161,33 +161,11 @@ out:
161 sock_put(sk); 161 sock_put(sk);
162} 162}
163 163
164/*
165 * Timer for listening sockets
166 */
167static void dccp_response_timer(struct sock *sk)
168{
169 inet_csk_reqsk_queue_prune(sk, TCP_SYNQ_INTERVAL, DCCP_TIMEOUT_INIT,
170 DCCP_RTO_MAX);
171}
172
173static void dccp_keepalive_timer(unsigned long data) 164static void dccp_keepalive_timer(unsigned long data)
174{ 165{
175 struct sock *sk = (struct sock *)data; 166 struct sock *sk = (struct sock *)data;
176 167
177 /* Only process if socket is not in use. */ 168 pr_err("dccp should not use a keepalive timer !\n");
178 bh_lock_sock(sk);
179 if (sock_owned_by_user(sk)) {
180 /* Try again later. */
181 inet_csk_reset_keepalive_timer(sk, HZ / 20);
182 goto out;
183 }
184
185 if (sk->sk_state == DCCP_LISTEN) {
186 dccp_response_timer(sk);
187 goto out;
188 }
189out:
190 bh_unlock_sock(sk);
191 sock_put(sk); 169 sock_put(sk);
192} 170}
193 171