When checking the inp_ip_minttl restriction for IPv6 packets, don't check

the IPv4 header.

CID:	1017920
Differential Revision:	https://reviews.freebsd.org/D4727
Reviewed by:	bz
MFC after:	2 weeks
Sponsored by:	Juniper Networks
This commit is contained in:
Jonathan T. Looney 2015-12-29 19:20:39 +00:00
parent 430acc472f
commit 2d8868dbb7

View File

@ -919,9 +919,10 @@ findpcb:
*/
if (inp->inp_ip_minttl != 0) {
#ifdef INET6
if (isipv6 && inp->inp_ip_minttl > ip6->ip6_hlim)
goto dropunlock;
else
if (isipv6) {
if (inp->inp_ip_minttl > ip6->ip6_hlim)
goto dropunlock;
} else
#endif
if (inp->inp_ip_minttl > ip->ip_ttl)
goto dropunlock;