summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authorVitaliy Makkoveev <mvs@cvs.openbsd.org>2022-08-28 18:43:13 +0000
committerVitaliy Makkoveev <mvs@cvs.openbsd.org>2022-08-28 18:43:13 +0000
commit5edcdacdf523ba0d449de8e32b954c4a9aee8437 (patch)
treeb45f7d9ea05b54bcdb2e14d12e70b6702cd1b195 /sys/kern/uipc_socket.c
parentc983fe6f68db12701d7c64ab043b9dece36030f6 (diff)
Don't check `so_pcb' with PR_WANTRCVD flag. tcp(4) sockets are the only
sockets which could have NULL `so_pcb' and we handle this case within tcp_rcvd() handler. ok bluhm@
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 6547ae918b6..0edc11ee7b0 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket.c,v 1.285 2022/08/26 16:17:38 mvs Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.286 2022/08/28 18:43:12 mvs Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
@@ -1155,7 +1155,7 @@ dontblock:
}
SBLASTRECORDCHK(&so->so_rcv, "soreceive 4");
SBLASTMBUFCHK(&so->so_rcv, "soreceive 4");
- if (pr->pr_flags & PR_WANTRCVD && so->so_pcb)
+ if (pr->pr_flags & PR_WANTRCVD)
pru_rcvd(so);
}
if (orig_resid == uio->uio_resid && orig_resid &&
@@ -1520,7 +1520,7 @@ somove(struct socket *so, int wait)
m = m->m_next;
if (m == NULL) {
sbdroprecord(so, &so->so_rcv);
- if (so->so_proto->pr_flags & PR_WANTRCVD && so->so_pcb)
+ if (so->so_proto->pr_flags & PR_WANTRCVD)
pru_rcvd(so);
goto nextpkt;
}
@@ -1626,7 +1626,7 @@ somove(struct socket *so, int wait)
}
/* Send window update to source peer as receive buffer has changed. */
- if (so->so_proto->pr_flags & PR_WANTRCVD && so->so_pcb)
+ if (so->so_proto->pr_flags & PR_WANTRCVD)
pru_rcvd(so);
/* Receive buffer did shrink by len bytes, adjust oob. */