summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-30 12:57:25 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-30 12:57:25 +0200
commitf0fa4e0c9085e0b4476b144185040ce9fbdc11e3 (patch)
tree21945650e08f76ad9ee2dc008ff8edfdb9b678bd /src
parent7f33ccb920df2c308aa3076522bea683c66cb83d (diff)
downloadfastd-f0fa4e0c9085e0b4476b144185040ce9fbdc11e3.tar
fastd-f0fa4e0c9085e0b4476b144185040ce9fbdc11e3.zip
Demote some sendmsg warnings to debug and debug2 levels
Diffstat (limited to 'src')
-rw-r--r--src/send.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/send.c b/src/send.c
index 3a990d2..c624405 100644
--- a/src/send.c
+++ b/src/send.c
@@ -115,8 +115,25 @@ static void send_type(fastd_context_t *ctx, const fastd_socket_t *sock, const fa
ret = sendmsg(sock->fd, &msg, 0);
} while (ret < 0 && errno == EINTR);
- if (ret < 0)
- pr_warn_errno(ctx, "sendmsg");
+ if (ret < 0) {
+ switch (errno) {
+ case EAGAIN:
+#if EAGAIN != EWOULDBLOCK
+ case EWOULDBLOCK:
+#endif
+ pr_debug2_errno(ctx, "sendmsg");
+ break;
+
+ case ENETDOWN:
+ case ENETUNREACH:
+ case EHOSTUNREACH:
+ pr_debug_errno(ctx, "sendmsg");
+ break;
+
+ default:
+ pr_warn_errno(ctx, "sendmsg");
+ }
+ }
fastd_buffer_free(buffer);
}