Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b89498a1 authored by Vladislav Yasevich's avatar Vladislav Yasevich Committed by Sridhar Samudrala
Browse files

[SCTP]: Allow linger to abort 1-N style sockets.



Enable SO_LINGER functionality for 1-N style sockets. The socket API
draft will be clarfied to allow for this functionality. The linger
settings will apply to all associations on a given socket.

Signed-off-by: default avatarVladislav Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: default avatarSridhar Samudrala <sri@us.ibm.com>
parent a601266e
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1242,14 +1242,14 @@ SCTP_STATIC void sctp_close(struct sock *sk, long timeout)
			if (sctp_state(asoc, CLOSED)) {
				sctp_unhash_established(asoc);
				sctp_association_free(asoc);
				continue;
			}
		}

			} else if (sock_flag(sk, SOCK_LINGER) &&
				   !sk->sk_lingertime)
		if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime)
			sctp_primitive_ABORT(asoc, NULL);
		else
			sctp_primitive_SHUTDOWN(asoc, NULL);
		} else
			sctp_primitive_SHUTDOWN(asoc, NULL);
	}

	/* Clean up any skbs sitting on the receive queue.  */