diff options
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index d68869f966c3..fd8acb48c3f2 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -702,12 +702,14 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc) | |||
702 | __u32 ctsn; | 702 | __u32 ctsn; |
703 | __u16 num_gabs, num_dup_tsns; | 703 | __u16 num_gabs, num_dup_tsns; |
704 | struct sctp_tsnmap *map = (struct sctp_tsnmap *)&asoc->peer.tsn_map; | 704 | struct sctp_tsnmap *map = (struct sctp_tsnmap *)&asoc->peer.tsn_map; |
705 | struct sctp_gap_ack_block gabs[SCTP_MAX_GABS]; | ||
705 | 706 | ||
707 | memset(gabs, 0, sizeof(gabs)); | ||
706 | ctsn = sctp_tsnmap_get_ctsn(map); | 708 | ctsn = sctp_tsnmap_get_ctsn(map); |
707 | SCTP_DEBUG_PRINTK("sackCTSNAck sent: 0x%x.\n", ctsn); | 709 | SCTP_DEBUG_PRINTK("sackCTSNAck sent: 0x%x.\n", ctsn); |
708 | 710 | ||
709 | /* How much room is needed in the chunk? */ | 711 | /* How much room is needed in the chunk? */ |
710 | num_gabs = sctp_tsnmap_num_gabs(map); | 712 | num_gabs = sctp_tsnmap_num_gabs(map, gabs); |
711 | num_dup_tsns = sctp_tsnmap_num_dups(map); | 713 | num_dup_tsns = sctp_tsnmap_num_dups(map); |
712 | 714 | ||
713 | /* Initialize the SACK header. */ | 715 | /* Initialize the SACK header. */ |
@@ -763,7 +765,7 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc) | |||
763 | /* Add the gap ack block information. */ | 765 | /* Add the gap ack block information. */ |
764 | if (num_gabs) | 766 | if (num_gabs) |
765 | sctp_addto_chunk(retval, sizeof(__u32) * num_gabs, | 767 | sctp_addto_chunk(retval, sizeof(__u32) * num_gabs, |
766 | sctp_tsnmap_get_gabs(map)); | 768 | gabs); |
767 | 769 | ||
768 | /* Add the duplicate TSN information. */ | 770 | /* Add the duplicate TSN information. */ |
769 | if (num_dup_tsns) | 771 | if (num_dup_tsns) |
@@ -1211,7 +1213,7 @@ struct sctp_chunk *sctp_chunkify(struct sk_buff *skb, | |||
1211 | */ | 1213 | */ |
1212 | retval->tsn_missing_report = 0; | 1214 | retval->tsn_missing_report = 0; |
1213 | retval->tsn_gap_acked = 0; | 1215 | retval->tsn_gap_acked = 0; |
1214 | retval->fast_retransmit = 0; | 1216 | retval->fast_retransmit = SCTP_CAN_FRTX; |
1215 | 1217 | ||
1216 | /* If this is a fragmented message, track all fragments | 1218 | /* If this is a fragmented message, track all fragments |
1217 | * of the message (for SEND_FAILED). | 1219 | * of the message (for SEND_FAILED). |
@@ -2288,8 +2290,9 @@ int sctp_process_init(struct sctp_association *asoc, sctp_cid_t cid, | |||
2288 | } | 2290 | } |
2289 | 2291 | ||
2290 | /* Set up the TSN tracking pieces. */ | 2292 | /* Set up the TSN tracking pieces. */ |
2291 | sctp_tsnmap_init(&asoc->peer.tsn_map, SCTP_TSN_MAP_SIZE, | 2293 | if (!sctp_tsnmap_init(&asoc->peer.tsn_map, SCTP_TSN_MAP_INITIAL, |
2292 | asoc->peer.i.initial_tsn); | 2294 | asoc->peer.i.initial_tsn, gfp)) |
2295 | goto clean_up; | ||
2293 | 2296 | ||
2294 | /* RFC 2960 6.5 Stream Identifier and Stream Sequence Number | 2297 | /* RFC 2960 6.5 Stream Identifier and Stream Sequence Number |
2295 | * | 2298 | * |
@@ -2467,7 +2470,7 @@ do_addr_param: | |||
2467 | break; | 2470 | break; |
2468 | 2471 | ||
2469 | case SCTP_PARAM_ADAPTATION_LAYER_IND: | 2472 | case SCTP_PARAM_ADAPTATION_LAYER_IND: |
2470 | asoc->peer.adaptation_ind = param.aind->adaptation_ind; | 2473 | asoc->peer.adaptation_ind = ntohl(param.aind->adaptation_ind); |
2471 | break; | 2474 | break; |
2472 | 2475 | ||
2473 | case SCTP_PARAM_SET_PRIMARY: | 2476 | case SCTP_PARAM_SET_PRIMARY: |