diff options
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/input.c | 4 | ||||
-rw-r--r-- | net/dccp/ipv4.c | 6 | ||||
-rw-r--r-- | net/dccp/minisocks.c | 5 | ||||
-rw-r--r-- | net/dccp/options.c | 35 |
4 files changed, 36 insertions, 14 deletions
diff --git a/net/dccp/input.c b/net/dccp/input.c index 622e976a51fe..76c3401e93a5 100644 --- a/net/dccp/input.c +++ b/net/dccp/input.c | |||
@@ -274,7 +274,9 @@ static int dccp_rcv_request_sent_state_process(struct sock *sk, | |||
274 | 274 | ||
275 | if (!between48(DCCP_SKB_CB(skb)->dccpd_ack_seq, dp->dccps_awl, dp->dccps_awh)) { | 275 | if (!between48(DCCP_SKB_CB(skb)->dccpd_ack_seq, dp->dccps_awl, dp->dccps_awh)) { |
276 | dccp_pr_debug("invalid ackno: S.AWL=%llu, P.ackno=%llu, S.AWH=%llu \n", | 276 | dccp_pr_debug("invalid ackno: S.AWL=%llu, P.ackno=%llu, S.AWH=%llu \n", |
277 | dp->dccps_awl, DCCP_SKB_CB(skb)->dccpd_ack_seq, dp->dccps_awh); | 277 | (unsigned long long) dp->dccps_awl, |
278 | (unsigned long long) DCCP_SKB_CB(skb)->dccpd_ack_seq, | ||
279 | (unsigned long long) dp->dccps_awh); | ||
278 | goto out_invalid_packet; | 280 | goto out_invalid_packet; |
279 | } | 281 | } |
280 | 282 | ||
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 7b90606ec10e..4fa56dbcbea4 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -1092,14 +1092,16 @@ int dccp_v4_rcv(struct sk_buff *skb) | |||
1092 | dccp_packet_name(dh->dccph_type), | 1092 | dccp_packet_name(dh->dccph_type), |
1093 | NIPQUAD(skb->nh.iph->saddr), ntohs(dh->dccph_sport), | 1093 | NIPQUAD(skb->nh.iph->saddr), ntohs(dh->dccph_sport), |
1094 | NIPQUAD(skb->nh.iph->daddr), ntohs(dh->dccph_dport), | 1094 | NIPQUAD(skb->nh.iph->daddr), ntohs(dh->dccph_dport), |
1095 | DCCP_SKB_CB(skb)->dccpd_seq); | 1095 | (unsigned long long) DCCP_SKB_CB(skb)->dccpd_seq); |
1096 | 1096 | ||
1097 | if (dccp_packet_without_ack(skb)) { | 1097 | if (dccp_packet_without_ack(skb)) { |
1098 | DCCP_SKB_CB(skb)->dccpd_ack_seq = DCCP_PKT_WITHOUT_ACK_SEQ; | 1098 | DCCP_SKB_CB(skb)->dccpd_ack_seq = DCCP_PKT_WITHOUT_ACK_SEQ; |
1099 | dccp_pr_debug_cat("\n"); | 1099 | dccp_pr_debug_cat("\n"); |
1100 | } else { | 1100 | } else { |
1101 | DCCP_SKB_CB(skb)->dccpd_ack_seq = dccp_hdr_ack_seq(skb); | 1101 | DCCP_SKB_CB(skb)->dccpd_ack_seq = dccp_hdr_ack_seq(skb); |
1102 | dccp_pr_debug_cat(", ack=%llu\n", DCCP_SKB_CB(skb)->dccpd_ack_seq); | 1102 | dccp_pr_debug_cat(", ack=%llu\n", |
1103 | (unsigned long long) | ||
1104 | DCCP_SKB_CB(skb)->dccpd_ack_seq); | ||
1103 | } | 1105 | } |
1104 | 1106 | ||
1105 | /* Step 2: | 1107 | /* Step 2: |
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c index 810f0c293b85..e498e389fccc 100644 --- a/net/dccp/minisocks.c +++ b/net/dccp/minisocks.c | |||
@@ -142,7 +142,10 @@ struct sock *dccp_check_req(struct sock *sk, struct sk_buff *skb, | |||
142 | /* Invalid ACK */ | 142 | /* Invalid ACK */ |
143 | if (DCCP_SKB_CB(skb)->dccpd_ack_seq != dccp_rsk(req)->dreq_iss) { | 143 | if (DCCP_SKB_CB(skb)->dccpd_ack_seq != dccp_rsk(req)->dreq_iss) { |
144 | dccp_pr_debug("Invalid ACK number: ack_seq=%llu, dreq_iss=%llu\n", | 144 | dccp_pr_debug("Invalid ACK number: ack_seq=%llu, dreq_iss=%llu\n", |
145 | DCCP_SKB_CB(skb)->dccpd_ack_seq, dccp_rsk(req)->dreq_iss); | 145 | (unsigned long long) |
146 | DCCP_SKB_CB(skb)->dccpd_ack_seq, | ||
147 | (unsigned long long) | ||
148 | dccp_rsk(req)->dreq_iss); | ||
146 | goto drop; | 149 | goto drop; |
147 | } | 150 | } |
148 | 151 | ||
diff --git a/net/dccp/options.c b/net/dccp/options.c index e1867767946c..9ca32cba83af 100644 --- a/net/dccp/options.c +++ b/net/dccp/options.c | |||
@@ -119,7 +119,9 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb) | |||
119 | opt_recv->dccpor_ack_vector_idx = value - options; | 119 | opt_recv->dccpor_ack_vector_idx = value - options; |
120 | 120 | ||
121 | dccp_pr_debug("%sACK vector 0, len=%d, ack_ackno=%llu\n", | 121 | dccp_pr_debug("%sACK vector 0, len=%d, ack_ackno=%llu\n", |
122 | debug_prefix, len, DCCP_SKB_CB(skb)->dccpd_ack_seq); | 122 | debug_prefix, len, |
123 | (unsigned long long) | ||
124 | DCCP_SKB_CB(skb)->dccpd_ack_seq); | ||
123 | dccp_ackvector_print(DCCP_SKB_CB(skb)->dccpd_ack_seq, | 125 | dccp_ackvector_print(DCCP_SKB_CB(skb)->dccpd_ack_seq, |
124 | value, len); | 126 | value, len); |
125 | dccp_ackpkts_check_rcv_ackvector(dp->dccps_hc_rx_ackpkts, sk, | 127 | dccp_ackpkts_check_rcv_ackvector(dp->dccps_hc_rx_ackpkts, sk, |
@@ -137,6 +139,7 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb) | |||
137 | 139 | ||
138 | dccp_pr_debug("%sTIMESTAMP=%u, ackno=%llu\n", | 140 | dccp_pr_debug("%sTIMESTAMP=%u, ackno=%llu\n", |
139 | debug_prefix, opt_recv->dccpor_timestamp, | 141 | debug_prefix, opt_recv->dccpor_timestamp, |
142 | (unsigned long long) | ||
140 | DCCP_SKB_CB(skb)->dccpd_ack_seq); | 143 | DCCP_SKB_CB(skb)->dccpd_ack_seq); |
141 | break; | 144 | break; |
142 | case DCCPO_TIMESTAMP_ECHO: | 145 | case DCCPO_TIMESTAMP_ECHO: |
@@ -147,7 +150,9 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb) | |||
147 | 150 | ||
148 | dccp_pr_debug("%sTIMESTAMP_ECHO=%u, len=%d, ackno=%llu, diff=%u\n", | 151 | dccp_pr_debug("%sTIMESTAMP_ECHO=%u, len=%d, ackno=%llu, diff=%u\n", |
149 | debug_prefix, opt_recv->dccpor_timestamp_echo, | 152 | debug_prefix, opt_recv->dccpor_timestamp_echo, |
150 | len + 2, DCCP_SKB_CB(skb)->dccpd_ack_seq, | 153 | len + 2, |
154 | (unsigned long long) | ||
155 | DCCP_SKB_CB(skb)->dccpd_ack_seq, | ||
151 | tcp_time_stamp - opt_recv->dccpor_timestamp_echo); | 156 | tcp_time_stamp - opt_recv->dccpor_timestamp_echo); |
152 | 157 | ||
153 | opt_recv->dccpor_elapsed_time = dccp_decode_value_var(value + 4, len - 4); | 158 | opt_recv->dccpor_elapsed_time = dccp_decode_value_var(value + 4, len - 4); |
@@ -308,7 +313,8 @@ void dccp_insert_option_elapsed_time(struct sock *sk, | |||
308 | 313 | ||
309 | dccp_pr_debug("%sELAPSED_TIME=%u, len=%d, seqno=%llu\n", | 314 | dccp_pr_debug("%sELAPSED_TIME=%u, len=%d, seqno=%llu\n", |
310 | debug_prefix, elapsed_time, | 315 | debug_prefix, elapsed_time, |
311 | len, DCCP_SKB_CB(skb)->dccpd_seq); | 316 | len, |
317 | (unsigned long long) DCCP_SKB_CB(skb)->dccpd_seq); | ||
312 | } | 318 | } |
313 | 319 | ||
314 | EXPORT_SYMBOL(dccp_insert_option_elapsed_time); | 320 | EXPORT_SYMBOL(dccp_insert_option_elapsed_time); |
@@ -382,7 +388,8 @@ static void dccp_insert_option_ack_vector(struct sock *sk, struct sk_buff *skb) | |||
382 | 388 | ||
383 | dccp_pr_debug("%sACK Vector 0, len=%d, ack_seqno=%llu, ack_ackno=%llu\n", | 389 | dccp_pr_debug("%sACK Vector 0, len=%d, ack_seqno=%llu, ack_ackno=%llu\n", |
384 | debug_prefix, ap->dccpap_ack_vector_len, | 390 | debug_prefix, ap->dccpap_ack_vector_len, |
385 | ap->dccpap_ack_seqno, ap->dccpap_ack_ackno); | 391 | (unsigned long long) ap->dccpap_ack_seqno, |
392 | (unsigned long long) ap->dccpap_ack_ackno); | ||
386 | } | 393 | } |
387 | 394 | ||
388 | static inline void dccp_insert_option_timestamp(struct sock *sk, struct sk_buff *skb) | 395 | static inline void dccp_insert_option_timestamp(struct sock *sk, struct sk_buff *skb) |
@@ -422,7 +429,8 @@ static void dccp_insert_option_timestamp_echo(struct sock *sk, struct sk_buff *s | |||
422 | 429 | ||
423 | dccp_pr_debug("%sTIMESTAMP_ECHO=%u, len=%d, seqno=%llu\n", | 430 | dccp_pr_debug("%sTIMESTAMP_ECHO=%u, len=%d, seqno=%llu\n", |
424 | debug_prefix, dp->dccps_timestamp_echo, | 431 | debug_prefix, dp->dccps_timestamp_echo, |
425 | len, DCCP_SKB_CB(skb)->dccpd_seq); | 432 | len, |
433 | (unsigned long long) DCCP_SKB_CB(skb)->dccpd_seq); | ||
426 | 434 | ||
427 | dp->dccps_timestamp_echo = 0; | 435 | dp->dccps_timestamp_echo = 0; |
428 | dp->dccps_timestamp_time = 0; | 436 | dp->dccps_timestamp_time = 0; |
@@ -607,7 +615,8 @@ int dccp_ackpkts_add(struct dccp_ackpkts *ap, u64 ackno, u8 state) | |||
607 | */ | 615 | */ |
608 | if (state == DCCP_ACKPKTS_STATE_NOT_RECEIVED && | 616 | if (state == DCCP_ACKPKTS_STATE_NOT_RECEIVED && |
609 | len == 0 && delta == 0) { /* Found our reserved seat! */ | 617 | len == 0 && delta == 0) { /* Found our reserved seat! */ |
610 | dccp_pr_debug("Found %llu reserved seat!\n", ackno); | 618 | dccp_pr_debug("Found %llu reserved seat!\n", |
619 | (unsigned long long) ackno); | ||
611 | ap->dccpap_buf[index] = state; | 620 | ap->dccpap_buf[index] = state; |
612 | goto out; | 621 | goto out; |
613 | } | 622 | } |
@@ -630,7 +639,8 @@ out: | |||
630 | 639 | ||
631 | out_duplicate: | 640 | out_duplicate: |
632 | /* Duplicate packet */ | 641 | /* Duplicate packet */ |
633 | dccp_pr_debug("Received a dup or already considered lost packet: %llu\n", ackno); | 642 | dccp_pr_debug("Received a dup or already considered lost packet: %llu\n", |
643 | (unsigned long long) ackno); | ||
634 | return -EILSEQ; | 644 | return -EILSEQ; |
635 | } | 645 | } |
636 | 646 | ||
@@ -640,7 +650,8 @@ void dccp_ackvector_print(const u64 ackno, const unsigned char *vector, int len) | |||
640 | if (!dccp_debug) | 650 | if (!dccp_debug) |
641 | return; | 651 | return; |
642 | 652 | ||
643 | printk("ACK vector len=%d, ackno=%llu |", len, ackno); | 653 | printk("ACK vector len=%d, ackno=%llu |", len, |
654 | (unsigned long long) ackno); | ||
644 | 655 | ||
645 | while (len--) { | 656 | while (len--) { |
646 | const u8 state = (*vector & DCCP_ACKPKTS_STATE_MASK) >> 6; | 657 | const u8 state = (*vector & DCCP_ACKPKTS_STATE_MASK) >> 6; |
@@ -693,7 +704,8 @@ void dccp_ackpkts_check_rcv_ackno(struct dccp_ackpkts *ap, struct sock *sk, | |||
693 | #endif | 704 | #endif |
694 | dccp_pr_debug("%sACK packet 0, len=%d, ack_seqno=%llu, ack_ackno=%llu, ACKED!\n", | 705 | dccp_pr_debug("%sACK packet 0, len=%d, ack_seqno=%llu, ack_ackno=%llu, ACKED!\n", |
695 | debug_prefix, 1, | 706 | debug_prefix, 1, |
696 | ap->dccpap_ack_seqno, ap->dccpap_ack_ackno); | 707 | (unsigned long long) ap->dccpap_ack_seqno, |
708 | (unsigned long long) ap->dccpap_ack_ackno); | ||
697 | dccp_ackpkts_trow_away_ack_record(ap); | 709 | dccp_ackpkts_trow_away_ack_record(ap); |
698 | ap->dccpap_ack_seqno = DCCP_MAX_SEQNO + 1; | 710 | ap->dccpap_ack_seqno = DCCP_MAX_SEQNO + 1; |
699 | } | 711 | } |
@@ -745,7 +757,10 @@ static void dccp_ackpkts_check_rcv_ackvector(struct dccp_ackpkts *ap, | |||
745 | #endif | 757 | #endif |
746 | dccp_pr_debug("%sACK vector 0, len=%d, ack_seqno=%llu, ack_ackno=%llu, ACKED!\n", | 758 | dccp_pr_debug("%sACK vector 0, len=%d, ack_seqno=%llu, ack_ackno=%llu, ACKED!\n", |
747 | debug_prefix, len, | 759 | debug_prefix, len, |
748 | ap->dccpap_ack_seqno, ap->dccpap_ack_ackno); | 760 | (unsigned long long) |
761 | ap->dccpap_ack_seqno, | ||
762 | (unsigned long long) | ||
763 | ap->dccpap_ack_ackno); | ||
749 | dccp_ackpkts_trow_away_ack_record(ap); | 764 | dccp_ackpkts_trow_away_ack_record(ap); |
750 | } | 765 | } |
751 | /* | 766 | /* |