Skip to content

Commit

Permalink
additional debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredh committed Apr 10, 2024
1 parent 2daa2f1 commit 4e84542
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/net/sockopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,19 @@ 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))) {
int err = RE_ERRNO_SOCK;
DEBUG_WARNING("IPV6_V6ONLY: %m\n", err);
return err;
}
#else
DEBUG_NOTICE("net_sockopt_v6only: COMPILE-TIME DISABLED\n");
#endif
#endif

return 0;
}

3 changes: 3 additions & 0 deletions test/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 4e84542

Please sign in to comment.