diff options
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 6dd9b3ef33d0..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) |