diff options
Diffstat (limited to 'net/dccp/minisocks.c')
-rw-r--r-- | net/dccp/minisocks.c | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c index a6a0b270fb6c..b8e67207e97e 100644 --- a/net/dccp/minisocks.c +++ b/net/dccp/minisocks.c | |||
@@ -69,8 +69,8 @@ void dccp_time_wait(struct sock *sk, int state, int timeo) | |||
69 | * socket up. We've got bigger problems than | 69 | * socket up. We've got bigger problems than |
70 | * non-graceful socket closings. | 70 | * non-graceful socket closings. |
71 | */ | 71 | */ |
72 | if (net_ratelimit()) | 72 | LIMIT_NETDEBUG(KERN_INFO "DCCP: time wait bucket " |
73 | printk(KERN_INFO "DCCP: time wait bucket table overflow\n"); | 73 | "table overflow\n"); |
74 | } | 74 | } |
75 | 75 | ||
76 | dccp_done(sk); | 76 | dccp_done(sk); |
@@ -98,19 +98,23 @@ struct sock *dccp_create_openreq_child(struct sock *sk, | |||
98 | newicsk->icsk_rto = DCCP_TIMEOUT_INIT; | 98 | newicsk->icsk_rto = DCCP_TIMEOUT_INIT; |
99 | 99 | ||
100 | if (newdp->dccps_options.dccpo_send_ack_vector) { | 100 | if (newdp->dccps_options.dccpo_send_ack_vector) { |
101 | newdp->dccps_hc_rx_ackpkts = dccp_ackpkts_alloc(DCCP_MAX_ACK_VECTOR_LEN, | 101 | newdp->dccps_hc_rx_ackpkts = |
102 | GFP_ATOMIC); | 102 | dccp_ackpkts_alloc(DCCP_MAX_ACK_VECTOR_LEN, |
103 | GFP_ATOMIC); | ||
103 | /* | 104 | /* |
104 | * XXX: We're using the same CCIDs set on the parent, i.e. sk_clone | 105 | * XXX: We're using the same CCIDs set on the parent, |
105 | * copied the master sock and left the CCID pointers for this child, | 106 | * i.e. sk_clone copied the master sock and left the |
106 | * that is why we do the __ccid_get calls. | 107 | * CCID pointers for this child, that is why we do the |
108 | * __ccid_get calls. | ||
107 | */ | 109 | */ |
108 | if (unlikely(newdp->dccps_hc_rx_ackpkts == NULL)) | 110 | if (unlikely(newdp->dccps_hc_rx_ackpkts == NULL)) |
109 | goto out_free; | 111 | goto out_free; |
110 | } | 112 | } |
111 | 113 | ||
112 | if (unlikely(ccid_hc_rx_init(newdp->dccps_hc_rx_ccid, newsk) != 0 || | 114 | if (unlikely(ccid_hc_rx_init(newdp->dccps_hc_rx_ccid, |
113 | ccid_hc_tx_init(newdp->dccps_hc_tx_ccid, newsk) != 0)) { | 115 | newsk) != 0 || |
116 | ccid_hc_tx_init(newdp->dccps_hc_tx_ccid, | ||
117 | newsk) != 0)) { | ||
114 | dccp_ackpkts_free(newdp->dccps_hc_rx_ackpkts); | 118 | dccp_ackpkts_free(newdp->dccps_hc_rx_ackpkts); |
115 | ccid_hc_rx_exit(newdp->dccps_hc_rx_ccid, newsk); | 119 | ccid_hc_rx_exit(newdp->dccps_hc_rx_ccid, newsk); |
116 | ccid_hc_tx_exit(newdp->dccps_hc_tx_ccid, newsk); | 120 | ccid_hc_tx_exit(newdp->dccps_hc_tx_ccid, newsk); |
@@ -129,7 +133,8 @@ out_free: | |||
129 | * Step 3: Process LISTEN state | 133 | * Step 3: Process LISTEN state |
130 | * | 134 | * |
131 | * Choose S.ISS (initial seqno) or set from Init Cookie | 135 | * Choose S.ISS (initial seqno) or set from Init Cookie |
132 | * Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init Cookie | 136 | * Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init |
137 | * Cookie | ||
133 | */ | 138 | */ |
134 | 139 | ||
135 | /* See dccp_v4_conn_request */ | 140 | /* See dccp_v4_conn_request */ |
@@ -160,13 +165,15 @@ struct sock *dccp_check_req(struct sock *sk, struct sk_buff *skb, | |||
160 | 165 | ||
161 | /* Check for retransmitted REQUEST */ | 166 | /* Check for retransmitted REQUEST */ |
162 | if (dccp_hdr(skb)->dccph_type == DCCP_PKT_REQUEST) { | 167 | if (dccp_hdr(skb)->dccph_type == DCCP_PKT_REQUEST) { |
163 | if (after48(DCCP_SKB_CB(skb)->dccpd_seq, dccp_rsk(req)->dreq_isr)) { | 168 | if (after48(DCCP_SKB_CB(skb)->dccpd_seq, |
169 | dccp_rsk(req)->dreq_isr)) { | ||
164 | struct dccp_request_sock *dreq = dccp_rsk(req); | 170 | struct dccp_request_sock *dreq = dccp_rsk(req); |
165 | 171 | ||
166 | dccp_pr_debug("Retransmitted REQUEST\n"); | 172 | dccp_pr_debug("Retransmitted REQUEST\n"); |
167 | /* Send another RESPONSE packet */ | 173 | /* Send another RESPONSE packet */ |
168 | dccp_set_seqno(&dreq->dreq_iss, dreq->dreq_iss + 1); | 174 | dccp_set_seqno(&dreq->dreq_iss, dreq->dreq_iss + 1); |
169 | dccp_set_seqno(&dreq->dreq_isr, DCCP_SKB_CB(skb)->dccpd_seq); | 175 | dccp_set_seqno(&dreq->dreq_isr, |
176 | DCCP_SKB_CB(skb)->dccpd_seq); | ||
170 | req->rsk_ops->rtx_syn_ack(sk, req, NULL); | 177 | req->rsk_ops->rtx_syn_ack(sk, req, NULL); |
171 | } | 178 | } |
172 | /* Network Duplicate, discard packet */ | 179 | /* Network Duplicate, discard packet */ |
@@ -181,7 +188,8 @@ struct sock *dccp_check_req(struct sock *sk, struct sk_buff *skb, | |||
181 | 188 | ||
182 | /* Invalid ACK */ | 189 | /* Invalid ACK */ |
183 | if (DCCP_SKB_CB(skb)->dccpd_ack_seq != dccp_rsk(req)->dreq_iss) { | 190 | if (DCCP_SKB_CB(skb)->dccpd_ack_seq != dccp_rsk(req)->dreq_iss) { |
184 | dccp_pr_debug("Invalid ACK number: ack_seq=%llu, dreq_iss=%llu\n", | 191 | dccp_pr_debug("Invalid ACK number: ack_seq=%llu, " |
192 | "dreq_iss=%llu\n", | ||
185 | (unsigned long long) | 193 | (unsigned long long) |
186 | DCCP_SKB_CB(skb)->dccpd_ack_seq, | 194 | DCCP_SKB_CB(skb)->dccpd_ack_seq, |
187 | (unsigned long long) | 195 | (unsigned long long) |
@@ -223,7 +231,8 @@ int dccp_child_process(struct sock *parent, struct sock *child, | |||
223 | const int state = child->sk_state; | 231 | const int state = child->sk_state; |
224 | 232 | ||
225 | if (!sock_owned_by_user(child)) { | 233 | if (!sock_owned_by_user(child)) { |
226 | ret = dccp_rcv_state_process(child, skb, dccp_hdr(skb), skb->len); | 234 | ret = dccp_rcv_state_process(child, skb, dccp_hdr(skb), |
235 | skb->len); | ||
227 | 236 | ||
228 | /* Wakeup parent, send SIGIO */ | 237 | /* Wakeup parent, send SIGIO */ |
229 | if (state == DCCP_RESPOND && child->sk_state != state) | 238 | if (state == DCCP_RESPOND && child->sk_state != state) |