diff options
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
| -rw-r--r-- | net/ipv4/tcp_ipv4.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 70df40980a87..3c23e70885f4 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
| @@ -60,6 +60,7 @@ | |||
| 60 | #include <linux/jhash.h> | 60 | #include <linux/jhash.h> |
| 61 | #include <linux/init.h> | 61 | #include <linux/init.h> |
| 62 | #include <linux/times.h> | 62 | #include <linux/times.h> |
| 63 | #include <linux/slab.h> | ||
| 63 | 64 | ||
| 64 | #include <net/net_namespace.h> | 65 | #include <net/net_namespace.h> |
| 65 | #include <net/icmp.h> | 66 | #include <net/icmp.h> |
| @@ -370,6 +371,11 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info) | |||
| 370 | if (sk->sk_state == TCP_CLOSE) | 371 | if (sk->sk_state == TCP_CLOSE) |
| 371 | goto out; | 372 | goto out; |
| 372 | 373 | ||
| 374 | if (unlikely(iph->ttl < inet_sk(sk)->min_ttl)) { | ||
| 375 | NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP); | ||
| 376 | goto out; | ||
| 377 | } | ||
| 378 | |||
| 373 | icsk = inet_csk(sk); | 379 | icsk = inet_csk(sk); |
| 374 | tp = tcp_sk(sk); | 380 | tp = tcp_sk(sk); |
| 375 | seq = ntohl(th->seq); | 381 | seq = ntohl(th->seq); |
