Skip to content

Commit

Permalink
daemon/worker: decrease log level of uv_udp_connect() failure
Browse files Browse the repository at this point in the history
In particular, ENETUNREACH happens on systems without IPv6,
and it doesn't make much sense to log about that by default:
  [io    ] Failed to establish udp connection: address not available

Introduced in 82e1d59 (v6.0.9).

Also log the IP address.
  • Loading branch information
vcunat committed Nov 19, 2024
1 parent c8f99cf commit 7566e06
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Knot Resolver 6.0.10 (202y-mm-dd)
================================

Improvements
------------
- avoid multiple log lines when IPv6 isn't available (!1633)


Knot Resolver 6.0.9 (2024-11-11)
================================

Expand Down
6 changes: 4 additions & 2 deletions daemon/worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,10 @@ static int transmit(struct qr_task *task)
do {
ret = uv_udp_connect(udp, out_comm.comm_addr);
} while (ret == UV_EADDRINUSE && --connect_tries > 0);
if (ret < 0)
kr_log_error(IO, "Failed to establish udp connection: %s\n", uv_strerror(ret));
if (ret < 0) {
kr_log_info(IO, "Failed to establish udp connection to %s: %s\n",
kr_straddr(out_comm.comm_addr), uv_strerror(ret));
}
}
ret = qr_task_send(task, session, &out_comm, task->pktbuf);
if (ret) {
Expand Down

0 comments on commit 7566e06

Please sign in to comment.