aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.6
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
commit947a74570de40c8f83ac6674d8438c6b6341307a (patch)
treeb5837a5f747181c9a2df05ffc39fa17bf1f14dc1 /target/linux/generic-2.6
parent64f38985136c0c1471dce14d50d6489d3e9bcd1b (diff)
downloadupstream-947a74570de40c8f83ac6674d8438c6b6341307a.tar.gz
upstream-947a74570de40c8f83ac6674d8438c6b6341307a.tar.bz2
upstream-947a74570de40c8f83ac6674d8438c6b6341307a.zip
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
Diffstat (limited to 'target/linux/generic-2.6')
-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 be9e6afd2d..8eae439f76 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)