summaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 7ab94c825b5..3bb991fd2b5 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -640,6 +640,14 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file,
return 0;
}
+ if (cmd == TUNGETFEATURES) {
+ /* Currently this just means: "what IFF flags are valid?".
+ * This is needed because we never checked for invalid flags on
+ * TUNSETIFF. */
+ return put_user(IFF_TUN | IFF_TAP | IFF_NO_PI | IFF_ONE_QUEUE,
+ (unsigned int __user*)argp);
+ }
+
if (!tun)
return -EBADFD;