diff options
author | Jody McIntyre <scjody@modernduck.com> | 2006-01-04 11:43:17 -0500 |
---|---|---|
committer | Jody McIntyre <scjody@modernduck.com> | 2006-01-04 11:43:17 -0500 |
commit | 34b8c399dc04c8e51f014b73458e654570698597 (patch) | |
tree | 7027eda7a780e9d945ef271f8c2ea5aaede5dd25 /net/8021q | |
parent | eaceec7f6cc5223d0f146086884d67746b8aa81d (diff) | |
parent | 88026842b0a760145aa71d69e74fbc9ec118ca44 (diff) |
Merge with http://kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'net/8021q')
-rw-r--r-- | net/8021q/vlan.c | 6 | ||||
-rw-r--r-- | net/8021q/vlan_dev.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 91e412b0ab0..67465b65abe 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -753,6 +753,8 @@ static int vlan_ioctl_handler(void __user *arg) break; case GET_VLAN_REALDEV_NAME_CMD: err = vlan_dev_get_realdev_name(args.device1, args.u.device2); + if (err) + goto out; if (copy_to_user(arg, &args, sizeof(struct vlan_ioctl_args))) { err = -EFAULT; @@ -761,6 +763,8 @@ static int vlan_ioctl_handler(void __user *arg) case GET_VLAN_VID_CMD: err = vlan_dev_get_vid(args.device1, &vid); + if (err) + goto out; args.u.VID = vid; if (copy_to_user(arg, &args, sizeof(struct vlan_ioctl_args))) { @@ -774,7 +778,7 @@ static int vlan_ioctl_handler(void __user *arg) __FUNCTION__, args.cmd); return -EINVAL; }; - +out: return err; } diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index b7486488967..f2a8750bbf1 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -165,6 +165,9 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, skb_pull(skb, VLAN_HLEN); /* take off the VLAN header (4 bytes currently) */ + /* Need to correct hardware checksum */ + skb_postpull_rcsum(skb, vhdr, VLAN_HLEN); + /* Ok, lets check to make sure the device (dev) we * came in on is what this VLAN is attached to. */ |