diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2006-10-31 03:55:11 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-10-31 03:55:11 +0100 |
commit | de76e695a5ce19c121ba7e246b45f258be678a75 (patch) | |
tree | 6a1a715574371cf4b8b84ef1a4e84d3b14c6fd77 /net/sctp/associola.c | |
parent | [SCTP]: Correctly set IP id for SCTP traffic (diff) | |
download | linux-de76e695a5ce19c121ba7e246b45f258be678a75.tar.xz linux-de76e695a5ce19c121ba7e246b45f258be678a75.zip |
[SCTP]: Remove temporary associations from backlog and hash.
Every time SCTP creates a temporary association, the stack hashes it,
puts it on a list of endpoint associations and increments the backlog.
However, the lifetime of a temporary association is the processing time
of a current packet and it's destroyed after that. In fact, we don't
really want anyone else finding this association. There is no reason to
do this extra work.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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) 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. |