diff options
author | Jonathan T. Looney <jtl@FreeBSD.org> | 2015-12-29 19:20:39 +0000 |
---|---|---|
committer | Jonathan T. Looney <jtl@FreeBSD.org> | 2015-12-29 19:20:39 +0000 |
commit | 2d8868dbb722cec24dc0845e87fd2253f8f3af83 (patch) | |
tree | c7ad605d3dcc2e0c79f457be641bed96a6f9dbd9 /sys/netinet/tcp_input.c | |
parent | 430acc472f22d5c1bdc100d8bf521d49845eeea5 (diff) | |
download | src-2d8868dbb722cec24dc0845e87fd2253f8f3af83.tar.gz src-2d8868dbb722cec24dc0845e87fd2253f8f3af83.zip |
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
Notes
Notes:
svn path=/head/; revision=292881
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 9aae6852a1b1..a763e464ba48 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -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; |