aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-07-04 00:28:14 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-04 00:28:14 -0400
commit67ab33db8be1cd466c09dfcba334d69d3e2f92e6 (patch)
tree3ae6448755977f0bbeea0f8da028b58bb1564580 /net/ipv4/tcp.c
parentf7d57e42e7ebd085133506ef6325e70e822196dc (diff)
parent300b93974ff64f1bef1ac8294547c573954f0300 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (27 commits) [Bluetooth] Add RFCOMM role switch support [Bluetooth] Allow disabling of credit based flow control [Bluetooth] Small cleanup of the L2CAP source code [Bluetooth] Use real devices for host controllers [Bluetooth] Add platform device for virtual and serial devices [Bluetooth] Add automatic sniff mode support [Bluetooth] Correct SCO buffer size on request [Bluetooth] Add suspend/resume support to the HCI USB driver [Bluetooth] Use raw mode for the Frontline sniffer device [BRIDGE]: br_dump_ifinfo index fix [ATM]: add+use poison defines [NET]: add+use poison defines [IOAT]: fix kernel-doc in source files [IOAT]: fix header file kernel-doc [TG3]: Add ipv6 TSO feature [IPV6]: Fix ipv6 GSO payload length [TIPC] Fixed sk_buff panic caused by tipc_link_bundle_buf (REVISED) [NET]: Verify gso_type too in gso_segment [IPVS]: Add sysctl documentation [ROSE]: Try all routes when establishing a ROSE connections. ...
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 804458712d88..f6a2d9223d07 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2170,8 +2170,19 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
2170 2170
2171 if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) { 2171 if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) {
2172 /* Packet is from an untrusted source, reset gso_segs. */ 2172 /* Packet is from an untrusted source, reset gso_segs. */
2173 int mss = skb_shinfo(skb)->gso_size; 2173 int type = skb_shinfo(skb)->gso_type;
2174 int mss;
2175
2176 if (unlikely(type &
2177 ~(SKB_GSO_TCPV4 |
2178 SKB_GSO_DODGY |
2179 SKB_GSO_TCP_ECN |
2180 SKB_GSO_TCPV6 |
2181 0) ||
2182 !(type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))))
2183 goto out;
2174 2184
2185 mss = skb_shinfo(skb)->gso_size;
2175 skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss; 2186 skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss;
2176 2187
2177 segs = NULL; 2188 segs = NULL;