summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-07-19 23:09:43 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-07-19 23:09:43 +0000
commit87e673487a04d7dcae5d402955cd018d5520895a (patch)
tree7ea67ea0eb6ad54b6fbd480c6ed311ba97e4ae0c /target
parentf8e0d6edb9352a242ca78fbd49f273b542e20170 (diff)
downloadmtk-20170518-87e673487a04d7dcae5d402955cd018d5520895a.zip
mtk-20170518-87e673487a04d7dcae5d402955cd018d5520895a.tar.gz
mtk-20170518-87e673487a04d7dcae5d402955cd018d5520895a.tar.bz2
add extra safety for the packet mangling in the mvswitch driver
SVN-Revision: 11880
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic-2.6/files/drivers/net/phy/mvswitch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/generic-2.6/files/drivers/net/phy/mvswitch.c b/target/linux/generic-2.6/files/drivers/net/phy/mvswitch.c
index be9e6af..8eae439 100644
--- a/target/linux/generic-2.6/files/drivers/net/phy/mvswitch.c
+++ b/target/linux/generic-2.6/files/drivers/net/phy/mvswitch.c
@@ -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)