diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-09-06 17:05:28 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-09-06 17:05:28 +0200 |
commit | 00b14825eead7dd748d15ce6519726d06b3ee0d5 (patch) | |
tree | e771e6dcde53b65a1d438dfabbe8cb4e7402e334 /drivers/net/tun.c | |
parent | mac80211: disconnect if channel switch fails (diff) | |
parent | Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jber... (diff) | |
download | linux-00b14825eead7dd748d15ce6519726d06b3ee0d5.tar.xz linux-00b14825eead7dd748d15ce6519726d06b3ee0d5.zip |
Merge remote-tracking branch 'wireless-next/master' into mac80211-next
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r-- | drivers/net/tun.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index c62163e272cd..926d4db5cb38 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1379,10 +1379,12 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd, int vnet_hdr_sz; int ret; - if (cmd == TUNSETIFF || _IOC_TYPE(cmd) == 0x89) + if (cmd == TUNSETIFF || _IOC_TYPE(cmd) == 0x89) { if (copy_from_user(&ifr, argp, ifreq_len)) return -EFAULT; - + } else { + memset(&ifr, 0, sizeof(ifr)); + } if (cmd == TUNGETFEATURES) { /* Currently this just means: "what IFF flags are valid?". * This is needed because we never checked for invalid flags on |