diff options
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r-- | net/sctp/associola.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 27329ce9c311..ed0445fe85e7 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -346,11 +346,18 @@ void sctp_association_free(struct sctp_association *asoc) | |||
346 | struct list_head *pos, *temp; | 346 | struct list_head *pos, *temp; |
347 | int i; | 347 | int i; |
348 | 348 | ||
349 | list_del(&asoc->asocs); | 349 | /* Only real associations count against the endpoint, so |
350 | * don't bother for if this is a temporary association. | ||
351 | */ | ||
352 | if (!asoc->temp) { | ||
353 | list_del(&asoc->asocs); | ||
350 | 354 | ||
351 | /* Decrement the backlog value for a TCP-style listening socket. */ | 355 | /* Decrement the backlog value for a TCP-style listening |
352 | if (sctp_style(sk, TCP) && sctp_sstate(sk, LISTENING)) | 356 | * socket. |
353 | sk->sk_ack_backlog--; | 357 | */ |
358 | if (sctp_style(sk, TCP) && sctp_sstate(sk, LISTENING)) | ||
359 | sk->sk_ack_backlog--; | ||
360 | } | ||
354 | 361 | ||
355 | /* Mark as dead, so other users can know this structure is | 362 | /* Mark as dead, so other users can know this structure is |
356 | * going away. | 363 | * going away. |