[CRIU] [PATCH] add macro to ignore cant connect inet socket back error

Smite Chow xiaopengyou2no1 at gmail.com
Mon Oct 22 12:40:38 MSK 2018


Signed-off-by: Smite Chow <xiaopengyou2no1 at gmail.com>
---
 soccr/soccr.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/soccr/soccr.c b/soccr/soccr.c
index 7d093b1a..03672008 100644
--- a/soccr/soccr.c
+++ b/soccr/soccr.c
@@ -492,8 +492,12 @@ static int libsoccr_set_sk_data_noq(struct libsoccr_sk *sk,
 
 	if (connect(sk->fd, &sk->dst_addr->sa, addr_size) == -1 &&
 						errno != EINPROGRESS) {
-		loge("Can't connect inet socket back\n");
+		logerr("Can't connect inet socket back");
+#ifndef TCPOPT_RESTORE_IGNORE_CANT_CONNECT_INET_SOCKET_BACK_ERROR
 		return -1;
+#else
+		return 0;
+#endif
 	}
 
 	if (data->state == TCP_SYN_SENT && tcp_repair_on(sk->fd))
-- 
2.17.1



More information about the CRIU mailing list