aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authorIan Dowse <iedowse@FreeBSD.org>2002-02-28 11:22:40 +0000
committerIan Dowse <iedowse@FreeBSD.org>2002-02-28 11:22:40 +0000
commit167b8d0334032721c0749106a32eb6eb9e438eee (patch)
tree31279c60d95dfc2d617dd0fc3d2fb014953b7fb3 /sys/kern/uipc_socket.c
parenta821e36e413e90a98fd19c406b288538d6372d9d (diff)
downloadsrc-167b8d0334032721c0749106a32eb6eb9e438eee.tar.gz
src-167b8d0334032721c0749106a32eb6eb9e438eee.zip
In sosend(), enforce the socket buffer limits regardless of whether
the data was supplied as a uio or an mbuf. Previously the limit was ignored for mbuf data, and NFS could run the kernel out of mbufs when an ipfw rule blocked retransmissions.
Notes
Notes: svn path=/head/; revision=91482
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 5572127ea310..b9ff2de26437 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -549,7 +549,7 @@ restart:
if ((atomic && resid > so->so_snd.sb_hiwat) ||
clen > so->so_snd.sb_hiwat)
snderr(EMSGSIZE);
- if (space < resid + clen && uio &&
+ if (space < resid + clen &&
(atomic || space < so->so_snd.sb_lowat || space < clen)) {
if (so->so_state & SS_NBIO)
snderr(EWOULDBLOCK);