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:
rwatson 2009-01-03 11:35:31 +00:00
parent b3e09f9424
commit b56f7e98e0

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;