From a00428ef92c0cd7808fdd0169366fd51f893c29d Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sun, 20 Feb 2005 15:54:44 +0000 Subject: [PATCH] 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 --- sys/kern/uipc_socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 18077a8d1ca..8e34acdb950 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);