diff options
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r-- | drivers/net/tun.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 62b2b3005019..691d264fbb6f 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #include <linux/if_ether.h> | 62 | #include <linux/if_ether.h> |
63 | #include <linux/if_tun.h> | 63 | #include <linux/if_tun.h> |
64 | #include <linux/crc32.h> | 64 | #include <linux/crc32.h> |
65 | #include <net/net_namespace.h> | ||
65 | 66 | ||
66 | #include <asm/system.h> | 67 | #include <asm/system.h> |
67 | #include <asm/uaccess.h> | 68 | #include <asm/uaccess.h> |
@@ -475,7 +476,7 @@ static int tun_set_iff(struct file *file, struct ifreq *ifr) | |||
475 | !capable(CAP_NET_ADMIN)) | 476 | !capable(CAP_NET_ADMIN)) |
476 | return -EPERM; | 477 | return -EPERM; |
477 | } | 478 | } |
478 | else if (__dev_get_by_name(ifr->ifr_name)) | 479 | else if (__dev_get_by_name(&init_net, ifr->ifr_name)) |
479 | return -EINVAL; | 480 | return -EINVAL; |
480 | else { | 481 | else { |
481 | char *name; | 482 | char *name; |