summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/if_tun.h
diff options
context:
space:
mode:
authorPavel Emelyanov2013-06-11 12:41:24 +0200
committerDavid S. Miller2013-06-13 00:07:21 +0200
commit274038f8c94c493e2977983e2aecb5f5f0778479 (patch)
tree59c639c040acb5af3eafe2a2eb7787c03dd5bfbf /include/uapi/linux/if_tun.h
parentudp: fix two sparse errors (diff)
downloadkernel-qcow2-linux-274038f8c94c493e2977983e2aecb5f5f0778479.tar.gz
kernel-qcow2-linux-274038f8c94c493e2977983e2aecb5f5f0778479.tar.xz
kernel-qcow2-linux-274038f8c94c493e2977983e2aecb5f5f0778479.zip
tun: Report "persist" flag to userspace
The TUN_PERSIST flag is not reported at all -- both TUNGETIFF, and sysfs "flags" attribute skip one. Knowing whether a device is persistent or not is critical for checkpoint-restore, thus I propose to add the read-only IFF_PERSIST one for this. Setting this new IFF_PERSIST is hardly possible, as TUNSETIFF doesn't check for unknown flags being zero and thus there can be trash. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/if_tun.h')
-rw-r--r--include/uapi/linux/if_tun.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/if_tun.h b/include/uapi/linux/if_tun.h
index 2835b85fd46d..82334f88967e 100644
--- a/include/uapi/linux/if_tun.h
+++ b/include/uapi/linux/if_tun.h
@@ -68,6 +68,8 @@
#define IFF_MULTI_QUEUE 0x0100
#define IFF_ATTACH_QUEUE 0x0200
#define IFF_DETACH_QUEUE 0x0400
+/* read-only flag */
+#define IFF_PERSIST 0x0800
/* Features for GSO (TUNSETOFFLOAD). */
#define TUN_F_CSUM 0x01 /* You can hand me unchecksummed packets. */