diff options
-rw-r--r-- | net/dccp/ccids/ccid3.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 2745d835f037..62c304200eda 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -264,13 +264,13 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, | |||
264 | 264 | ||
265 | BUG_ON(hctx == NULL); | 265 | BUG_ON(hctx == NULL); |
266 | 266 | ||
267 | /* Check if pure ACK or Terminating*/ | ||
268 | /* | 267 | /* |
269 | * XXX: We only call this function for DATA and DATAACK, on, these | 268 | * This function is called only for Data and DataAck packets. Sending |
270 | * packets can have zero length, but why the comment about "pure ACK"? | 269 | * zero-sized Data(Ack)s is theoretically possible, but for congestion |
270 | * control this case is pathological - ignore it. | ||
271 | */ | 271 | */ |
272 | if (unlikely(len == 0)) | 272 | if (unlikely(len == 0)) |
273 | return -ENOTCONN; | 273 | return -EBADMSG; |
274 | 274 | ||
275 | /* See if last packet allocated was not sent */ | 275 | /* See if last packet allocated was not sent */ |
276 | new_packet = dccp_tx_hist_head(&hctx->ccid3hctx_hist); | 276 | new_packet = dccp_tx_hist_head(&hctx->ccid3hctx_hist); |
@@ -387,11 +387,7 @@ static void ccid3_hc_tx_packet_sent(struct sock *sk, int more, int len) | |||
387 | 387 | ||
388 | switch (hctx->ccid3hctx_state) { | 388 | switch (hctx->ccid3hctx_state) { |
389 | case TFRC_SSTATE_NO_SENT: | 389 | case TFRC_SSTATE_NO_SENT: |
390 | /* if first wasn't pure ack */ | 390 | /* fall through */ |
391 | if (len != 0) | ||
392 | DCCP_CRIT("%s, First packet sent is noted " | ||
393 | "as a data packet", dccp_role(sk)); | ||
394 | return; | ||
395 | case TFRC_SSTATE_NO_FBACK: | 391 | case TFRC_SSTATE_NO_FBACK: |
396 | /* t_nom, t_ipi, delta do not change until feedback arrives */ | 392 | /* t_nom, t_ipi, delta do not change until feedback arrives */ |
397 | return; | 393 | return; |