diff options
| author | George V. Neville-Neil <gnn@FreeBSD.org> | 2006-01-14 16:39:31 +0000 |
|---|---|---|
| committer | George V. Neville-Neil <gnn@FreeBSD.org> | 2006-01-14 16:39:31 +0000 |
| commit | 34f83c52e7ffb6a49c15ec41296f8d2096692b55 (patch) | |
| tree | 0430f6d7c0d639b3d1a324a8c61c70f1637f72ab /sys | |
| parent | 9cbec74dcbfce8b41eb8a7b79983b6e0083673d1 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/netinet/tcp_input.c | 10 | ||||
| -rw-r--r-- | sys/netinet/tcp_reass.c | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index c62752d634aa..a8f3c8168fbd 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.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) { /* diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index c62752d634aa..a8f3c8168fbd 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) { /* |
