Check the correct TTL in both the IPv6 and IPv4 cases.
Submitted by: glebius Reviewed by: gnn, bz Found with: Coverity Prevent(tm)
This commit is contained in:
parent
9cbec74dcb
commit
34f83c52e7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154366
@ -743,8 +743,14 @@ tcp_input(m, off0)
|
||||
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;
|
||||
#endif
|
||||
if (inp->inp_ip_minttl > ip->ip_ttl)
|
||||
goto drop;
|
||||
}
|
||||
|
||||
if (inp->inp_vflag & INP_TIMEWAIT) {
|
||||
/*
|
||||
|
@ -743,8 +743,14 @@ tcp_input(m, off0)
|
||||
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;
|
||||
#endif
|
||||
if (inp->inp_ip_minttl > ip->ip_ttl)
|
||||
goto drop;
|
||||
}
|
||||
|
||||
if (inp->inp_vflag & INP_TIMEWAIT) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user