summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index f5299fd..b741f41 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1388,7 +1388,13 @@ dontblock:
}
SBLASTRECORDCHK(&so->so_rcv);
SBLASTMBUFCHK(&so->so_rcv);
- if (pr->pr_flags & PR_WANTRCVD && so->so_pcb) {
+ /*
+ * If soreceive() is being done from the socket callback, then
+ * don't need to generate ACK to peer to update window, since
+ * ACK will be generated on return to TCP.
+ */
+ if (!(flags & MSG_SOCALLBCK) &&
+ (pr->pr_flags & PR_WANTRCVD) && so->so_pcb) {
SOCKBUF_UNLOCK(&so->so_rcv);
(*pr->pr_usrreqs->pru_rcvd)(so, flags);
SOCKBUF_LOCK(&so->so_rcv);
OpenPOWER on IntegriCloud