summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-02-20 15:54:44 +0000
committerrwatson <rwatson@FreeBSD.org>2005-02-20 15:54:44 +0000
commit8b42e2e7b8f7788416e3ec565d9be29e9bd5c068 (patch)
treecaaf43269a1d2c758789e73b7af87dea5281cb98 /sys/kern/uipc_socket.c
parent69199ae6b5c617a8ac679a900b335845baf546d1 (diff)
downloadFreeBSD-src-8b42e2e7b8f7788416e3ec565d9be29e9bd5c068.zip
FreeBSD-src-8b42e2e7b8f7788416e3ec565d9be29e9bd5c068.tar.gz
In soreceive(), when considering delivery to a socket in SS_ISCONFIRMING,
only call the protocol's pru_rcvd() if the protocol has the flag PR_WANTRCVD set. This brings that instance of pru_rcvd() into line with the rest, which do check the flag. MFC after: 3 days
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 18077a8..8e34acd 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -981,7 +981,8 @@ soreceive(so, psa, uio, mp0, controlp, flagsp)
return (soreceive_rcvoob(so, uio, flags));
if (mp != NULL)
*mp = NULL;
- if (so->so_state & SS_ISCONFIRMING && uio->uio_resid)
+ if ((pr->pr_flags & PR_WANTRCVD) && (so->so_state & SS_ISCONFIRMING)
+ && uio->uio_resid)
(*pr->pr_usrreqs->pru_rcvd)(so, 0);
SOCKBUF_LOCK(&so->so_rcv);
OpenPOWER on IntegriCloud