2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-01 14:55:39 +00:00

soccr: Print errors in send_fin (v2)

v2: Use logerr where needed.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Pavel Emelyanov
2017-04-04 20:45:20 +03:00
committed by Andrei Vagin
parent 5a7b90b595
commit fc9fea15af

View File

@@ -564,11 +564,15 @@ static int send_fin(struct libsoccr_sk *sk, struct libsoccr_sk_data *data,
libnet_type, /* injection type */ libnet_type, /* injection type */
NULL, /* network interface */ NULL, /* network interface */
errbuf); /* errbuf */ errbuf); /* errbuf */
if (l == NULL) if (l == NULL) {
loge("libnet_init failed (%s)\n", errbuf);
return -1; return -1;
}
if (setsockopt(l->fd, SOL_SOCKET, SO_MARK, &mark, sizeof(mark))) if (setsockopt(l->fd, SOL_SOCKET, SO_MARK, &mark, sizeof(mark))) {
logerr("Can't set SO_MARK (%d) for socket\n", mark);
goto err; goto err;
}
ret = libnet_build_tcp( ret = libnet_build_tcp(
ntohs(sk->dst_addr->v4.sin_port), /* source port */ ntohs(sk->dst_addr->v4.sin_port), /* source port */