Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103216
b: refs/heads/master
c: 07240fd
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell authored and David S. Miller committed Jul 3, 2008
1 parent 07dc556 commit fb659e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 44d28ab19c64d095314ac66f765d0c747519f4ed
refs/heads/master: 07240fd0902c872f044f523893364a1a24c9f278
8 changes: 8 additions & 0 deletions trunk/drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/if_tun.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#define TUNSETOWNER _IOW('T', 204, int)
#define TUNSETLINK _IOW('T', 205, int)
#define TUNSETGROUP _IOW('T', 206, int)
#define TUNGETFEATURES _IOR('T', 207, unsigned int)

/* TUNSETIFF ifr flags */
#define IFF_TUN 0x0001
Expand Down

0 comments on commit fb659e6

Please sign in to comment.