diff mbox series

odhcpd: Reduce error messages

Message ID cfe8c33e-00c2-3fd6-9473-c3ee8542c5e5@chocky.org
State Accepted
Headers show
Series odhcpd: Reduce error messages | expand

Commit Message

Peter Naulls Jan. 24, 2023, 7:35 p.m. UTC
When there's no network cable connected to LAN, then odhcpd does this:

Tue Jan 24 18:32:04 2023 daemon.err odhcpd[2017]: Failed to send to 
ff02::1%lan@br-lan (Address not available)
Tue Jan 24 18:32:20 2023 daemon.err odhcpd[2017]: Failed to send to 
ff02::1%lan@br-lan (Address not available)
Tue Jan 24 18:32:36 2023 daemon.err odhcpd[2017]: Failed to send to 
ff02::1%lan@br-lan (Address not available)
Tue Jan 24 18:32:52 2023 daemon.err odhcpd[2017]: Failed to send to 
ff02::1%lan@br-lan (Address not available)

Accurate, but not very interesting. I think this would be better served
as debug.

Signed-off-by: Peter Naulls <peter@chocky.org>
---
diff mbox series

Patch

--- a/src/odhcpd.c	2023-01-24 13:29:56.080616097 -0500
+++ b/src/odhcpd.c	2023-01-24 13:30:19.284692423 -0500
@@ -207,7 +207,7 @@ 
 
 	ssize_t sent = sendmsg(socket, &msg, MSG_DONTWAIT);
 	if (sent < 0)
-		syslog(LOG_ERR, "Failed to send to %s%%%s@%s (%m)",
+		syslog(LOG_DEBUG, "Failed to send to %s%%%s@%s (%m)",
 				ipbuf, iface->name, iface->ifname);
 	else
 		syslog(LOG_DEBUG, "Sent %zd bytes to %s%%%s@%s",