aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/sctp/associola.c15
-rw-r--r--net/sctp/endpointola.c7
-rw-r--r--net/sctp/input.c6
3 files changed, 24 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.
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index 35c49ff2d062..9b6b394b66f6 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -144,6 +144,13 @@ void sctp_endpoint_add_asoc(struct sctp_endpoint *ep,
144{ 144{
145 struct sock *sk = ep->base.sk; 145 struct sock *sk = ep->base.sk;
146 146
147 /* If this is a temporary association, don't bother
148 * since we'll be removing it shortly and don't
149 * want anyone to find it anyway.
150 */
151 if (asoc->temp)
152 return;
153
147 /* Now just add it to our list of asocs */ 154 /* Now just add it to our list of asocs */
148 list_add_tail(&asoc->asocs, &ep->asocs); 155 list_add_tail(&asoc->asocs, &ep->asocs);
149 156
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 99c0501ca513..6d82f400d13c 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -771,6 +771,9 @@ static void __sctp_hash_established(struct sctp_association *asoc)
771/* Add an association to the hash. Local BH-safe. */ 771/* Add an association to the hash. Local BH-safe. */
772void sctp_hash_established(struct sctp_association *asoc) 772void sctp_hash_established(struct sctp_association *asoc)
773{ 773{
774 if (asoc->temp)
775 return;
776
774 sctp_local_bh_disable(); 777 sctp_local_bh_disable();
775 __sctp_hash_established(asoc); 778 __sctp_hash_established(asoc);
776 sctp_local_bh_enable(); 779 sctp_local_bh_enable();
@@ -804,6 +807,9 @@ static void __sctp_unhash_established(struct sctp_association *asoc)
804/* Remove association from the hash table. Local BH-safe. */ 807/* Remove association from the hash table. Local BH-safe. */
805void sctp_unhash_established(struct sctp_association *asoc) 808void sctp_unhash_established(struct sctp_association *asoc)
806{ 809{
810 if (asoc->temp)
811 return;
812
807 sctp_local_bh_disable(); 813 sctp_local_bh_disable();
808 __sctp_unhash_established(asoc); 814 __sctp_unhash_established(asoc);
809 sctp_local_bh_enable(); 815 sctp_local_bh_enable();