[CRIU] [PATCH 10/12] kdat: Config for ipv6

Pavel Emelyanov xemul at virtuozzo.com
Mon Apr 24 13:08:53 PDT 2017


Whether or not kernel supports ipv6 can be found out compile-time.

Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 criu/kerndat.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/criu/kerndat.c b/criu/kerndat.c
index e8f955f..516fc47 100644
--- a/criu/kerndat.c
+++ b/criu/kerndat.c
@@ -437,6 +437,13 @@ out:
 	return exit_code;
 }
 
+#ifdef CONFIG_KERNEL_IPV6
+static inline int get_ipv6(void)
+{
+	kdat.ipv6 = CONFIG_KERNEL_IPV6;
+	return 0;
+}
+#else
 static int get_ipv6()
 {
 	if (access("/proc/sys/net/ipv6", F_OK) < 0) {
@@ -451,6 +458,7 @@ static int get_ipv6()
 	kdat.ipv6 = true;
 	return 0;
 }
+#endif
 
 int check_loginuid_op(bool full)
 {
-- 
2.5.5



More information about the CRIU mailing list