aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2013-08-21 06:32:00 -0400
committerDavid S. Miller <davem@davemloft.net>2013-08-21 15:21:45 -0400
commit3d407a80b62fc5891b41fe9045f23aba4437fc33 (patch)
treebdc3ffa6f8ad278de357e289b585fcb683c52ebb /drivers/net/tun.c
parentfb7589a162162223e6bb6422dde3fb1ce07d9a78 (diff)
tun: Report whether the queue is attached or not
Multiqueue tun devices allow to attach and detach from its queues while keeping the interface itself set on file. Knowing this is critical for the checkpoint part of criu project. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 4b65fbcc490f..db43a2409733 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1881,6 +1881,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
1881 case TUNGETIFF: 1881 case TUNGETIFF:
1882 tun_get_iff(current->nsproxy->net_ns, tun, &ifr); 1882 tun_get_iff(current->nsproxy->net_ns, tun, &ifr);
1883 1883
1884 if (tfile->detached)
1885 ifr.ifr_flags |= IFF_DETACH_QUEUE;
1886
1884 if (copy_to_user(argp, &ifr, ifreq_len)) 1887 if (copy_to_user(argp, &ifr, ifreq_len))
1885 ret = -EFAULT; 1888 ret = -EFAULT;
1886 break; 1889 break;