diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:50:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:50:18 -0500 |
commit | d89b218b801fd93ea95880f1c7fde348cbcc51c5 (patch) | |
tree | cd3c34e1811f9b2bc10ecfb957bf26cbd04c677e /net/ipv4/tcp_ipv4.c | |
parent | 80a186074e72e2cd61f6716d90cf32ce54981a56 (diff) | |
parent | bec68ff1637ca00bb1585a03a7be8a13380084de (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (108 commits)
bridge: ensure to unlock in error path in br_multicast_query().
drivers/net/tulip/eeprom.c: fix bogus "(null)" in tulip init messages
sky2: Avoid rtnl_unlock without rtnl_lock
ipv6: Send netlink notification when DAD fails
drivers/net/tg3.c: change the field used with the TG3_FLAG_10_100_ONLY constant
ipconfig: Handle devices which take some time to come up.
mac80211: Fix memory leak in ieee80211_if_write()
mac80211: Fix (dynamic) power save entry
ipw2200: use kmalloc for large local variables
ath5k: read eeprom IQ calibration values correctly for G mode
ath5k: fix I/Q calibration (for real)
ath5k: fix TSF reset
ath5k: use fixed antenna for tx descriptors
libipw: split ieee->networks into small pieces
mac80211: Fix sta_mtx unlocking on insert STA failure path
rt2x00: remove KSEG1ADDR define from rt2x00soc.h
net: add ColdFire support to the smc91x driver
asix: fix setting mac address for AX88772
ipv6 ip6_tunnel: eliminate unused recursion field from ip6_tnl{}.
net: Fix dev_mc_add()
...
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index c3588b4fd979..70df40980a87 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1651,13 +1651,15 @@ int tcp_v4_rcv(struct sk_buff *skb) | |||
1651 | if (!sk) | 1651 | if (!sk) |
1652 | goto no_tcp_socket; | 1652 | goto no_tcp_socket; |
1653 | 1653 | ||
1654 | if (iph->ttl < inet_sk(sk)->min_ttl) | ||
1655 | goto discard_and_relse; | ||
1656 | |||
1657 | process: | 1654 | process: |
1658 | if (sk->sk_state == TCP_TIME_WAIT) | 1655 | if (sk->sk_state == TCP_TIME_WAIT) |
1659 | goto do_time_wait; | 1656 | goto do_time_wait; |
1660 | 1657 | ||
1658 | if (unlikely(iph->ttl < inet_sk(sk)->min_ttl)) { | ||
1659 | NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP); | ||
1660 | goto discard_and_relse; | ||
1661 | } | ||
1662 | |||
1661 | if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb)) | 1663 | if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb)) |
1662 | goto discard_and_relse; | 1664 | goto discard_and_relse; |
1663 | nf_reset(skb); | 1665 | nf_reset(skb); |
@@ -1682,8 +1684,11 @@ process: | |||
1682 | if (!tcp_prequeue(sk, skb)) | 1684 | if (!tcp_prequeue(sk, skb)) |
1683 | ret = tcp_v4_do_rcv(sk, skb); | 1685 | ret = tcp_v4_do_rcv(sk, skb); |
1684 | } | 1686 | } |
1685 | } else | 1687 | } else if (unlikely(sk_add_backlog(sk, skb))) { |
1686 | sk_add_backlog(sk, skb); | 1688 | bh_unlock_sock(sk); |
1689 | NET_INC_STATS_BH(net, LINUX_MIB_TCPBACKLOGDROP); | ||
1690 | goto discard_and_relse; | ||
1691 | } | ||
1687 | bh_unlock_sock(sk); | 1692 | bh_unlock_sock(sk); |
1688 | 1693 | ||
1689 | sock_put(sk); | 1694 | sock_put(sk); |