[05/12] kdat: Config for tcp hc

Submitted by Pavel Emelianov on April 24, 2017, 8:07 p.m.

Details

Message ID 58FE5B10.7060703@virtuozzo.com
State New
Series "Speed up kdat checks"
Headers show

Commit Message

Pavel Emelianov April 24, 2017, 8:07 p.m.
Whether or not kernel supports half-closed TCP repair can
be known compile-time.

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

Patch hide | download patch | download mbox

diff --git a/criu/kerndat.c b/criu/kerndat.c
index b291682..46b9bd7 100644
--- a/criu/kerndat.c
+++ b/criu/kerndat.c
@@ -575,6 +575,13 @@  err:
 	return exit_code;
 }
 
+#ifdef CONFIG_KERNEL_TCP_REPAIR_HC
+static inline int kerndat_tcp_repair(void)
+{
+	kdat.has_tcp_half_closed = CONFIG_KERNEL_TCP_REPAIR_HC;
+	return 0;
+}
+#else
 static int kerndat_tcp_repair(void)
 {
 	int ret;
@@ -587,6 +594,7 @@  static int kerndat_tcp_repair(void)
 
 	return ret;
 }
+#endif
 
 int kerndat_nsid(void)
 {