diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-12-03 22:39:53 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-04 19:20:39 +0100 |
commit | 117632e64d2a5f464e491fe221d7169a3814a77b (patch) | |
tree | 88f3a036305da54a62835d900553dda9bc846a8f /net/ipv4/fib_frontend.c | |
parent | sfc: Use kcalloc instead of kzalloc to allocate array (diff) | |
download | linux-117632e64d2a5f464e491fe221d7169a3814a77b.tar.xz linux-117632e64d2a5f464e491fe221d7169a3814a77b.zip |
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 'net/ipv4/fib_frontend.c')
0 files changed, 0 insertions, 0 deletions