MFC 1.286 & 1.287: Check the correct TTL in both the IPv6 and IPv4 cases.
This commit is contained in:
parent
e3fbc5aabf
commit
afdcfafe55
@ -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) {
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user