kernel: properly pad the allocated headroom in skb_cow to NET_SKB_PAD
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31906 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
4f1451b47e
commit
260e2d8486
|
@ -10,10 +10,11 @@
|
|||
if (headroom < NET_SKB_PAD)
|
||||
- headroom = NET_SKB_PAD;
|
||||
- if (headroom > skb_headroom(skb))
|
||||
- delta = headroom - skb_headroom(skb);
|
||||
+ alloc_headroom = NET_SKB_PAD;
|
||||
+ if (headroom > skb_headroom(skb) ||
|
||||
+ (cloned && alloc_headroom > skb_headroom(skb))) {
|
||||
delta = headroom - skb_headroom(skb);
|
||||
+ delta = alloc_headroom - skb_headroom(skb);
|
||||
+ }
|
||||
|
||||
if (delta || cloned)
|
||||
|
|
Loading…
Reference in New Issue