summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_reass.c
diff options
context:
space:
mode:
authorgnn <gnn@FreeBSD.org>2006-01-14 16:39:31 +0000
committergnn <gnn@FreeBSD.org>2006-01-14 16:39:31 +0000
commit33105fb85b141bdf4833ddf81ee6acd5ed0f700a (patch)
tree0430f6d7c0d639b3d1a324a8c61c70f1637f72ab /sys/netinet/tcp_reass.c
parent801f6ef27ba7ef2c1ee268a34b31d70a31cd3852 (diff)
downloadFreeBSD-src-33105fb85b141bdf4833ddf81ee6acd5ed0f700a.zip
FreeBSD-src-33105fb85b141bdf4833ddf81ee6acd5ed0f700a.tar.gz
Check the correct TTL in both the IPv6 and IPv4 cases.
Submitted by: glebius Reviewed by: gnn, bz Found with: Coverity Prevent(tm)
Diffstat (limited to 'sys/netinet/tcp_reass.c')
-rw-r--r--sys/netinet/tcp_reass.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index c62752d..a8f3c81 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -743,8 +743,14 @@ 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;
+#endif
+ if (inp->inp_ip_minttl > ip->ip_ttl)
+ goto drop;
+ }
if (inp->inp_vflag & INP_TIMEWAIT) {
/*
OpenPOWER on IntegriCloud