Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40541
b: refs/heads/master
c: de76e69
h: refs/heads/master
i:
  40539: 7ecb144
v: v3
  • Loading branch information
Vlad Yasevich authored and David S. Miller committed Oct 31, 2006
1 parent f9c88b8 commit a9b47ee
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4f4443088b763ca4ac7521e9b4a881b52c294dec
refs/heads/master: de76e695a5ce19c121ba7e246b45f258be678a75
15 changes: 11 additions & 4 deletions trunk/net/sctp/associola.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,18 @@ void sctp_association_free(struct sctp_association *asoc)
struct list_head *pos, *temp;
int i;

list_del(&asoc->asocs);
/* Only real associations count against the endpoint, so
* don't bother for if this is a temporary association.
*/
if (!asoc->temp) {
list_del(&asoc->asocs);

/* Decrement the backlog value for a TCP-style listening socket. */
if (sctp_style(sk, TCP) && sctp_sstate(sk, LISTENING))
sk->sk_ack_backlog--;
/* Decrement the backlog value for a TCP-style listening
* socket.
*/
if (sctp_style(sk, TCP) && sctp_sstate(sk, LISTENING))
sk->sk_ack_backlog--;
}

/* Mark as dead, so other users can know this structure is
* going away.
Expand Down
7 changes: 7 additions & 0 deletions trunk/net/sctp/endpointola.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ void sctp_endpoint_add_asoc(struct sctp_endpoint *ep,
{
struct sock *sk = ep->base.sk;

/* If this is a temporary association, don't bother
* since we'll be removing it shortly and don't
* want anyone to find it anyway.
*/
if (asoc->temp)
return;

/* Now just add it to our list of asocs */
list_add_tail(&asoc->asocs, &ep->asocs);

Expand Down
6 changes: 6 additions & 0 deletions trunk/net/sctp/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,9 @@ static void __sctp_hash_established(struct sctp_association *asoc)
/* Add an association to the hash. Local BH-safe. */
void sctp_hash_established(struct sctp_association *asoc)
{
if (asoc->temp)
return;

sctp_local_bh_disable();
__sctp_hash_established(asoc);
sctp_local_bh_enable();
Expand Down Expand Up @@ -804,6 +807,9 @@ static void __sctp_unhash_established(struct sctp_association *asoc)
/* Remove association from the hash table. Local BH-safe. */
void sctp_unhash_established(struct sctp_association *asoc)
{
if (asoc->temp)
return;

sctp_local_bh_disable();
__sctp_unhash_established(asoc);
sctp_local_bh_enable();
Expand Down

0 comments on commit a9b47ee

Please sign in to comment.