aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2007-09-26 18:36:08 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:45 -0400
commitcecd8d0ec4cb4fec728f67163bb0a78f80c292eb (patch)
tree0203cb30479143463cb2228ef872be2f1e10ddec
parente356d37a096a990ea1a74c44c15640122e56110b (diff)
[DCCP]: Reduce the number of writable states
Since DCCP requires to close both ends of a connection simultaneously, permission to write in state DCCP_CLOSING is removed in dccp_sendmsg(): * if the sending end closed, it would encounter a write error anyhow; * if the other end has closed the connection, it accepts no more data. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
-rw-r--r--net/dccp/proto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 604de8bfa068..7e4f54a4ecaf 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -664,7 +664,7 @@ int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
664 * so that the trick in dccp_rcv_request_sent_state_process. 664 * so that the trick in dccp_rcv_request_sent_state_process.
665 */ 665 */
666 /* Wait for a connection to finish. */ 666 /* Wait for a connection to finish. */
667 if ((1 << sk->sk_state) & ~(DCCPF_OPEN | DCCPF_PARTOPEN | DCCPF_CLOSING)) 667 if ((1 << sk->sk_state) & ~(DCCPF_OPEN | DCCPF_PARTOPEN))
668 if ((rc = sk_stream_wait_connect(sk, &timeo)) != 0) 668 if ((rc = sk_stream_wait_connect(sk, &timeo)) != 0)
669 goto out_release; 669 goto out_release;
670 670