diff options
Diffstat (limited to 'net/sctp/output.c')
-rw-r--r-- | net/sctp/output.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c index b94c21190566..94c110dcaf1d 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -234,18 +234,19 @@ static sctp_xmit_t sctp_packet_bundle_sack(struct sctp_packet *pkt, | |||
234 | if (sctp_chunk_is_data(chunk) && !pkt->has_sack && | 234 | if (sctp_chunk_is_data(chunk) && !pkt->has_sack && |
235 | !pkt->has_cookie_echo) { | 235 | !pkt->has_cookie_echo) { |
236 | struct sctp_association *asoc; | 236 | struct sctp_association *asoc; |
237 | struct timer_list *timer; | ||
237 | asoc = pkt->transport->asoc; | 238 | asoc = pkt->transport->asoc; |
239 | timer = &asoc->timers[SCTP_EVENT_TIMEOUT_SACK]; | ||
238 | 240 | ||
239 | if (asoc->a_rwnd > asoc->rwnd) { | 241 | /* If the SACK timer is running, we have a pending SACK */ |
242 | if (timer_pending(timer)) { | ||
240 | struct sctp_chunk *sack; | 243 | struct sctp_chunk *sack; |
241 | asoc->a_rwnd = asoc->rwnd; | 244 | asoc->a_rwnd = asoc->rwnd; |
242 | sack = sctp_make_sack(asoc); | 245 | sack = sctp_make_sack(asoc); |
243 | if (sack) { | 246 | if (sack) { |
244 | struct timer_list *timer; | ||
245 | retval = sctp_packet_append_chunk(pkt, sack); | 247 | retval = sctp_packet_append_chunk(pkt, sack); |
246 | asoc->peer.sack_needed = 0; | 248 | asoc->peer.sack_needed = 0; |
247 | timer = &asoc->timers[SCTP_EVENT_TIMEOUT_SACK]; | 249 | if (del_timer(timer)) |
248 | if (timer_pending(timer) && del_timer(timer)) | ||
249 | sctp_association_put(asoc); | 250 | sctp_association_put(asoc); |
250 | } | 251 | } |
251 | } | 252 | } |