mirror of https://github.com/hak5/openwrt.git
kernel: properly pad the allocated headroom in skb_cow to NET_SKB_PAD
SVN-Revision: 31906lede-17.01
parent
0b8c1c8dfb
commit
51bc47ce7c
|
@ -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