Skip to content

Commit

Permalink
tun: Report whether the queue is attached or not
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Aug 21, 2013
1 parent fb7589a commit 3d407a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -1881,6 +1881,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
case TUNGETIFF:
tun_get_iff(current->nsproxy->net_ns, tun, &ifr);

if (tfile->detached)
ifr.ifr_flags |= IFF_DETACH_QUEUE;

if (copy_to_user(argp, &ifr, ifreq_len))
ret = -EFAULT;
break;
Expand Down

0 comments on commit 3d407a8

Please sign in to comment.