summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2011-02-11 15:14:51 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2011-02-11 15:14:51 +0000
commit87f88e28fa9883ad1e7028bb7331f998204b3aab (patch)
treef7f29a9de0beba85a01c33049f1ac8b08547f438
parente9d43217df189a3f7e81602a84247fbd54b26545 (diff)
Notes
-rw-r--r--sys/netinet/tcp_usrreq.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 6ed592e175d4..b8d544a25657 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1331,9 +1331,10 @@ tcp_ctloutput(struct socket *so, struct sockopt *sopt)
INP_WLOCK_RECHECK(inp);
if (optval)
tp->t_flags |= TF_NOPUSH;
- else {
+ else if (tp->t_flags & TF_NOPUSH) {
tp->t_flags &= ~TF_NOPUSH;
- error = tcp_output(tp);
+ if (TCPS_HAVEESTABLISHED(tp->t_state))
+ error = tcp_output(tp);
}
INP_WUNLOCK(inp);
break;