From 2daa2f16732f9e1026dcd165a075f22287c2185a Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" <114750+alfredh@users.noreply.github.com> Date: Tue, 9 Apr 2024 13:55:12 +0200 Subject: [PATCH 1/2] test: udp_listen NULL --- test/udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/udp.c b/test/udp.c index 22a8d3243..31dadcda3 100644 --- a/test/udp.c +++ b/test/udp.c @@ -164,7 +164,7 @@ int test_udp(void) if (err) goto out; - err = udp_listen(&ut->usc, &ut->cli, udp_recv_client, ut); + err = udp_listen(&ut->usc, NULL, udp_recv_client, ut); err |= udp_listen(&ut->uss, &ut->srv, udp_recv_server, ut); if (err) goto out; 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 2/2] 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);