summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2002-02-28 11:22:40 +0000
committeriedowse <iedowse@FreeBSD.org>2002-02-28 11:22:40 +0000
commit5c807e00f8ff8b61f1e36093c70a0ae2d1dbb05b (patch)
tree31279c60d95dfc2d617dd0fc3d2fb014953b7fb3
parent906748aa31a3ab72196c5304954ef4af1543402d (diff)
downloadFreeBSD-src-5c807e00f8ff8b61f1e36093c70a0ae2d1dbb05b.zip
FreeBSD-src-5c807e00f8ff8b61f1e36093c70a0ae2d1dbb05b.tar.gz
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.
-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 5572127..b9ff2de 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);
OpenPOWER on IntegriCloud