Allow the IP_MINTTL socket option to be set to 0 so that it can be

disabled entirely, which is its default state before set to a
non-zero value.

PR:		128790
Submitted by:	Nick Hilliard <nick at foobar dot org>
MFC after:	3 weeks
This commit is contained in:
Robert Watson 2009-01-03 11:35:31 +00:00
parent 35b81ec2e5
commit a603c811f8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=186717

View File

@ -892,7 +892,7 @@ ip_ctloutput(struct socket *so, struct sockopt *sopt)
break;
case IP_MINTTL:
if (optval > 0 && optval <= MAXTTL)
if (optval >= 0 && optval <= MAXTTL)
inp->inp_ip_minttl = optval;
else
error = EINVAL;