From 4e845422a27cfb778100cb9879d5435f385970d7 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" <114750+alfredh@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:28:48 +0200 Subject: [PATCH] additional debug info --- src/net/sockopt.c | 7 +++++-- test/udp.c | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/net/sockopt.c b/src/net/sockopt.c index a2572bf19..550795335 100644 --- a/src/net/sockopt.c +++ b/src/net/sockopt.c @@ -124,7 +124,8 @@ int net_sockopt_v6only(re_sock_t fd, bool only) { int on = only; -#ifndef OPENBSD + DEBUG_NOTICE("net_sockopt_v6only: on=%d\n", on); + #ifdef IPV6_V6ONLY if (-1 == setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, BUF_CAST &on, sizeof(on))) { @@ -132,8 +133,10 @@ int net_sockopt_v6only(re_sock_t fd, bool only) DEBUG_WARNING("IPV6_V6ONLY: %m\n", err); return err; } +#else + DEBUG_NOTICE("net_sockopt_v6only: COMPILE-TIME DISABLED\n"); #endif -#endif + return 0; } diff --git a/test/udp.c b/test/udp.c index 31dadcda3..1f2f01f79 100644 --- a/test/udp.c +++ b/test/udp.c @@ -48,6 +48,9 @@ static int send_data(struct udp_sock *us, const struct sa *peer, mb->pos = 0; err = udp_send(us, peer, mb); + if (err) { + DEBUG_WARNING("udp_send error: %m\n", err); + } mem_deref(mb);