Commit fc9fea15 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Andrei Vagin

soccr: Print errors in send_fin (v2)

v2: Use logerr where needed.
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 5a7b90b5
...@@ -564,11 +564,15 @@ static int send_fin(struct libsoccr_sk *sk, struct libsoccr_sk_data *data, ...@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment