1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 23:17:31 +02:00

add extra safety for the packet mangling in the mvswitch driver

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11880 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2008-07-19 23:09:43 +00:00
parent f85a5739c0
commit 15333144ce

View File

@ -78,7 +78,7 @@ mvswitch_mangle_tx(struct sk_buff *skb, struct net_device *dev)
if (__vlan_hwaccel_get_tag(skb, &vid))
goto error;
if ((skb->len <= 62) || (skb_headroom(skb) < MV_HEADER_SIZE)) {
if (skb_cloned(skb) || (skb->len <= 62) || (skb_headroom(skb) < MV_HEADER_SIZE)) {
if (pskb_expand_head(skb, MV_HEADER_SIZE, 0, GFP_ATOMIC))
goto error_expand;
if (skb->len < 62)