MFC 1.286 & 1.287: Check the correct TTL in both the IPv6 and IPv4 cases.

This commit is contained in:
andre 2006-01-31 16:09:34 +00:00
parent e3fbc5aabf
commit afdcfafe55

View File

@ -742,8 +742,15 @@ findpcb:
INP_LOCK(inp);
/* Check the minimum TTL for socket. */
if (inp->inp_ip_minttl && inp->inp_ip_minttl > ip->ip_ttl)
goto drop;
if (inp->inp_ip_minttl != 0) {
#ifdef INET6
if (isipv6 && inp->inp_ip_minttl > ip6->ip6_hlim)
goto drop;
else
#endif
if (inp->inp_ip_minttl > ip->ip_ttl)
goto drop;
}
if (inp->inp_vflag & INP_TIMEWAIT) {
/*