diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-12-04 01:39:53 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-04 22:20:39 +0400 |
commit | 117632e64d2a5f464e491fe221d7169a3814a77b (patch) | |
tree | 88f3a036305da54a62835d900553dda9bc846a8f /virt | |
parent | c2e4e25afcc8ae1835a6100089f1f9fd3a362430 (diff) | |
download | linux-117632e64d2a5f464e491fe221d7169a3814a77b.tar.xz |
tcp: take care of misalignments
We discovered that TCP stack could retransmit misaligned skbs if a
malicious peer acknowledged sub MSS frame. This currently can happen
only if output interface is non SG enabled : If SG is enabled, tcp
builds headless skbs (all payload is included in fragments), so the tcp
trimming process only removes parts of skb fragments, header stay
aligned.
Some arches cant handle misalignments, so force a head reallocation and
shrink headroom to MAX_TCP_HEADER.
Dont care about misaligments on x86 and PPC (or other arches setting
NET_IP_ALIGN to 0)
This patch introduces __pskb_copy() which can specify the headroom of
new head, and pskb_copy() becomes a wrapper on top of __pskb_copy()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions