diff options
Diffstat (limited to 'net/dccp/ccids/ccid2.c')
-rw-r--r-- | net/dccp/ccids/ccid2.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index fd38b05d6f79..248d20f4c7c4 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c | |||
@@ -139,7 +139,7 @@ static int ccid2_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb) | |||
139 | return 0; | 139 | return 0; |
140 | } | 140 | } |
141 | 141 | ||
142 | hctx = ccid2_hc_tx_sk(sk); | 142 | hctx = ccid2_hc_tx_sk(sk); |
143 | 143 | ||
144 | ccid2_pr_debug("pipe=%d cwnd=%d\n", hctx->ccid2hctx_pipe, | 144 | ccid2_pr_debug("pipe=%d cwnd=%d\n", hctx->ccid2hctx_pipe, |
145 | hctx->ccid2hctx_cwnd); | 145 | hctx->ccid2hctx_cwnd); |
@@ -368,13 +368,13 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len) | |||
368 | static int ccid2_ackvector(struct sock *sk, struct sk_buff *skb, int offset, | 368 | static int ccid2_ackvector(struct sock *sk, struct sk_buff *skb, int offset, |
369 | unsigned char **vec, unsigned char *veclen) | 369 | unsigned char **vec, unsigned char *veclen) |
370 | { | 370 | { |
371 | const struct dccp_hdr *dh = dccp_hdr(skb); | 371 | const struct dccp_hdr *dh = dccp_hdr(skb); |
372 | unsigned char *options = (unsigned char *)dh + dccp_hdr_len(skb); | 372 | unsigned char *options = (unsigned char *)dh + dccp_hdr_len(skb); |
373 | unsigned char *opt_ptr; | 373 | unsigned char *opt_ptr; |
374 | const unsigned char *opt_end = (unsigned char *)dh + | 374 | const unsigned char *opt_end = (unsigned char *)dh + |
375 | (dh->dccph_doff * 4); | 375 | (dh->dccph_doff * 4); |
376 | unsigned char opt, len; | 376 | unsigned char opt, len; |
377 | unsigned char *value; | 377 | unsigned char *value; |
378 | 378 | ||
379 | BUG_ON(offset < 0); | 379 | BUG_ON(offset < 0); |
380 | options += offset; | 380 | options += offset; |
@@ -383,29 +383,29 @@ static int ccid2_ackvector(struct sock *sk, struct sk_buff *skb, int offset, | |||
383 | return -1; | 383 | return -1; |
384 | 384 | ||
385 | while (opt_ptr != opt_end) { | 385 | while (opt_ptr != opt_end) { |
386 | opt = *opt_ptr++; | 386 | opt = *opt_ptr++; |
387 | len = 0; | 387 | len = 0; |
388 | value = NULL; | 388 | value = NULL; |
389 | 389 | ||
390 | /* Check if this isn't a single byte option */ | 390 | /* Check if this isn't a single byte option */ |
391 | if (opt > DCCPO_MAX_RESERVED) { | 391 | if (opt > DCCPO_MAX_RESERVED) { |
392 | if (opt_ptr == opt_end) | 392 | if (opt_ptr == opt_end) |
393 | goto out_invalid_option; | 393 | goto out_invalid_option; |
394 | 394 | ||
395 | len = *opt_ptr++; | 395 | len = *opt_ptr++; |
396 | if (len < 3) | 396 | if (len < 3) |
397 | goto out_invalid_option; | 397 | goto out_invalid_option; |
398 | /* | 398 | /* |
399 | * Remove the type and len fields, leaving | 399 | * Remove the type and len fields, leaving |
400 | * just the value size | 400 | * just the value size |
401 | */ | 401 | */ |
402 | len -= 2; | 402 | len -= 2; |
403 | value = opt_ptr; | 403 | value = opt_ptr; |
404 | opt_ptr += len; | 404 | opt_ptr += len; |
405 | 405 | ||
406 | if (opt_ptr > opt_end) | 406 | if (opt_ptr > opt_end) |
407 | goto out_invalid_option; | 407 | goto out_invalid_option; |
408 | } | 408 | } |
409 | 409 | ||
410 | switch (opt) { | 410 | switch (opt) { |
411 | case DCCPO_ACK_VECTOR_0: | 411 | case DCCPO_ACK_VECTOR_0: |
@@ -432,7 +432,7 @@ static void ccid2_hc_tx_kill_rto_timer(struct sock *sk) | |||
432 | } | 432 | } |
433 | 433 | ||
434 | static inline void ccid2_new_ack(struct sock *sk, | 434 | static inline void ccid2_new_ack(struct sock *sk, |
435 | struct ccid2_seq *seqp, | 435 | struct ccid2_seq *seqp, |
436 | unsigned int *maxincr) | 436 | unsigned int *maxincr) |
437 | { | 437 | { |
438 | struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk); | 438 | struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk); |
@@ -759,7 +759,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
759 | 759 | ||
760 | static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk) | 760 | static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk) |
761 | { | 761 | { |
762 | struct ccid2_hc_tx_sock *hctx = ccid_priv(ccid); | 762 | struct ccid2_hc_tx_sock *hctx = ccid_priv(ccid); |
763 | 763 | ||
764 | ccid2_change_cwnd(hctx, 1); | 764 | ccid2_change_cwnd(hctx, 1); |
765 | /* Initialize ssthresh to infinity. This means that we will exit the | 765 | /* Initialize ssthresh to infinity. This means that we will exit the |
@@ -793,7 +793,7 @@ static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk) | |||
793 | 793 | ||
794 | static void ccid2_hc_tx_exit(struct sock *sk) | 794 | static void ccid2_hc_tx_exit(struct sock *sk) |
795 | { | 795 | { |
796 | struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk); | 796 | struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk); |
797 | int i; | 797 | int i; |
798 | 798 | ||
799 | ccid2_hc_tx_kill_rto_timer(sk); | 799 | ccid2_hc_tx_kill_rto_timer(sk); |