From de76e695a5ce19c121ba7e246b45f258be678a75 Mon Sep 17 00:00:00 2001 From: Vlad Yasevich Date: Mon, 30 Oct 2006 18:55:11 -0800 Subject: [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 Signed-off-by: Sridhar Samudrala Signed-off-by: David S. Miller --- net/sctp/endpointola.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'net/sctp/endpointola.c') diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index 35c49ff..9b6b394 100644 --- a/net/sctp/endpointola.c +++ b/net/sctp/endpointola.c @@ -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); -- cgit v1.1