diff options
-rw-r--r-- | include/net/sctp/sctp.h | 5 | ||||
-rw-r--r-- | net/sctp/associola.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 9fbd856e6713..856f01cb51dd 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -426,6 +426,11 @@ static inline void sctp_assoc_pending_pmtu(struct sock *sk, struct sctp_associat | |||
426 | asoc->pmtu_pending = 0; | 426 | asoc->pmtu_pending = 0; |
427 | } | 427 | } |
428 | 428 | ||
429 | static inline bool sctp_chunk_pending(const struct sctp_chunk *chunk) | ||
430 | { | ||
431 | return !list_empty(&chunk->list); | ||
432 | } | ||
433 | |||
429 | /* Walk through a list of TLV parameters. Don't trust the | 434 | /* Walk through a list of TLV parameters. Don't trust the |
430 | * individual parameter lengths and instead depend on | 435 | * individual parameter lengths and instead depend on |
431 | * the chunk length to indicate when to stop. Make sure | 436 | * the chunk length to indicate when to stop. Make sure |
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index a88b8524846e..f791edd64d6c 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -1668,6 +1668,8 @@ struct sctp_chunk *sctp_assoc_lookup_asconf_ack( | |||
1668 | * ack chunk whose serial number matches that of the request. | 1668 | * ack chunk whose serial number matches that of the request. |
1669 | */ | 1669 | */ |
1670 | list_for_each_entry(ack, &asoc->asconf_ack_list, transmitted_list) { | 1670 | list_for_each_entry(ack, &asoc->asconf_ack_list, transmitted_list) { |
1671 | if (sctp_chunk_pending(ack)) | ||
1672 | continue; | ||
1671 | if (ack->subh.addip_hdr->serial == serial) { | 1673 | if (ack->subh.addip_hdr->serial == serial) { |
1672 | sctp_chunk_hold(ack); | 1674 | sctp_chunk_hold(ack); |
1673 | return ack; | 1675 | return ack; |