summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-06-29 18:14:36 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-06-29 18:14:36 +0000
commit4d7c793c8c7cca6b45f239f86a6d486ce70d4096 (patch)
treee7c265a86b294529c4cb8239e698eb3da7a05113 /sys/kern/uipc_socket.c
parent6f9a6d7e191d00688f4acf9a0abf0484e4cb2c87 (diff)
constrain lowwater >= highwater
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index d84b4a97d18..1ac388494d8 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket.c,v 1.14 1997/06/23 01:42:04 deraadt Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.15 1997/06/29 18:14:35 deraadt Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
@@ -913,10 +913,12 @@ sosetopt(so, level, optname, m0)
break;
case SO_SNDLOWAT:
- so->so_snd.sb_lowat = (long)cnt;
+ so->so_snd.sb_lowat = (cnt > so->so_snd.sb_hiwat) ?
+ so->so_snd.sb_hiwat : cnt;
break;
case SO_RCVLOWAT:
- so->so_rcv.sb_lowat = (long)cnt;
+ so->so_rcv.sb_lowat = (cnt > so->so_rcv.sb_hiwat) ?
+ so->so_rcv.sb_hiwat : cnt;
break;
}
break;