Small SO_RCVTIMEO and SO_SNDTIMEO values are mistakenly taken to be zero.

PR:		kern/32827
Submitted by:	Hartmut Brandt <brandt@fokus.gmd.de>
Approved by:	re (jhb)
MFC after:	2 weeks
This commit is contained in:
maxim 2002-11-27 13:34:04 +00:00
parent 556b103f4a
commit d8b13d0f35

View File

@ -1380,6 +1380,8 @@ sosetopt(so, sopt)
error = EDOM;
goto bad;
}
if (val == 0 && tv.tv_usec != 0)
val = 1;
switch (sopt->sopt_name) {
case SO_SNDTIMEO: