From 1f51aa1d5cc8610d2a338b6e4d940e28badadb0f Mon Sep 17 00:00:00 2001 From: Logan oos Even <46396513+Logan007@users.noreply.github.com> Date: Wed, 14 Jul 2021 14:52:22 +0200 Subject: [PATCH] conditionally downgraded one ERROR msg to DEBUG msg (#725) --- src/edge_utils.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/edge_utils.c b/src/edge_utils.c index 8b27675..4e95817 100644 --- a/src/edge_utils.c +++ b/src/edge_utils.c @@ -934,10 +934,19 @@ static ssize_t sendto_fd (n2n_edge_t *eee, const void *buf, if((sent <= 0) && (errno)) { char * c = strerror(errno); - traceEvent(TRACE_ERROR, "sendto_fd sendto failed (%d) %s", errno, c); + // downgrade to TRACE_DEBUG in case of custom AF_INVALID, i.e. supernode not resolved yet + if(errno == EAFNOSUPPORT /* 93 */) { + traceEvent(TRACE_DEBUG, "sendto_fd sendto failed (%d) %s", errno, c); #ifdef WIN32 - traceEvent(TRACE_ERROR, "sendto_fd WSAGetLastError(): %u", WSAGetLastError()); + traceEvent(TRACE_DEBUG, "sendto_fd WSAGetLastError(): %u", WSAGetLastError()); #endif + } else { + traceEvent(TRACE_ERROR, "sendto_fd sendto failed (%d) %s", errno, c); +#ifdef WIN32 + traceEvent(TRACE_ERROR, "sendto_fd WSAGetLastError(): %u", WSAGetLastError()); +#endif + } + if(eee->conf.connect_tcp) { supernode_disconnect(eee); eee->sn_wait = 1;