Patrick McHardy b2722b1c3a ip_fragment: also adjust skb->truesize for packets not owned by a socket
When a large packet gets reassembled by ip_defrag(), the head skb
accounts for all the fragments in skb->truesize. If this packet is
refragmented again, skb->truesize is not re-adjusted to reflect only
the head size since its not owned by a socket. If the head fragment
then gets recycled and reused for another received fragment, it might
exceed the defragmentation limits due to its large truesize value.

skb_recycle_check() explicitly checks for linear skbs, so any recycled
skb should reflect its true size in skb->truesize. Change ip_fragment()
to also adjust the truesize value of skbs not owned by a socket.

Reported-and-tested-by: Ben Menchaca <ben@bigfootnetworks.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-01 15:53:57 -08:00
..
2009-11-02 08:43:45 -06:00
2009-05-25 01:53:53 -07:00
2009-11-24 14:50:53 -08:00
2009-09-26 20:16:15 -07:00
2009-11-06 00:50:39 -08:00
2009-05-25 01:53:53 -07:00
2009-10-30 12:25:12 -07:00
2009-09-02 01:03:53 -07:00
2009-09-30 16:41:34 -07:00
2009-11-05 20:56:07 -08:00
2009-10-11 23:03:47 -07:00
2009-07-12 12:22:34 -07:00