[CRIU] [PATCH] soccr: Print errors in send_fin
Andrei Vagin
avagin at virtuozzo.com
Mon Apr 3 16:39:52 PDT 2017
On Mon, Apr 03, 2017 at 09:09:10PM +0300, Pavel Emelyanov wrote:
>
> Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
>
> ---
> soccr/soccr.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/soccr/soccr.c b/soccr/soccr.c
> index 70f9935..fda602e 100644
> --- a/soccr/soccr.c
> +++ b/soccr/soccr.c
> @@ -564,11 +564,15 @@ static int send_fin(struct libsoccr_sk *sk, struct libsoccr_sk_data *data,
> libnet_type, /* injection type */
> NULL, /* network interface */
> errbuf); /* errbuf */
> - if (l == NULL)
> + if (l == NULL) {
> + loge("libnet_init failed (%s)\n", errbuf);
> return -1;
> + }
>
> - if (setsockopt(l->fd, SOL_SOCKET, SO_MARK, &mark, sizeof(mark)))
> + if (setsockopt(l->fd, SOL_SOCKET, SO_MARK, &mark, sizeof(mark))) {
> + loge("Can't set SO_MARK (%d) for socket\n", mark);
you need to use logerr to print errno
> goto err;
> + }
>
> ret = libnet_build_tcp(
> ntohs(sk->dst_addr->v4.sin_port), /* source port */
> --
> 2.5.5
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list