zebra: Fix zlog_debug -> flog_err for error situations in IRDP

In several places we would send debug messages for failure situations
that really should be errors.

Signed-off-by: Donald Sharpd <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2020-02-17 19:31:57 -05:00
parent 08fa52a826
commit 3d0deb9c8b

View File

@ -315,7 +315,9 @@ void send_packet(struct interface *ifp, struct stream *s, uint32_t dst,
if (setsockopt(irdp_sock, IPPROTO_IP, IP_HDRINCL, (char *)&on,
sizeof(on))
< 0)
zlog_debug("sendto %s", safe_strerror(errno));
flog_err(EC_LIB_SOCKET,
"IRDP: Cannot set IP_HDRINCLU %s(%d) on %s",
safe_strerror(errno), errno, ifp->name);
if (dst == INADDR_BROADCAST) {
@ -324,7 +326,9 @@ void send_packet(struct interface *ifp, struct stream *s, uint32_t dst,
if (setsockopt(irdp_sock, SOL_SOCKET, SO_BROADCAST, &bon,
sizeof(bon))
< 0)
zlog_debug("sendto %s", safe_strerror(errno));
flog_err(EC_LIB_SOCKET,
"IRDP: Cannot set SO_BROADCAST %s(%d) on %s",
safe_strerror(errno), errno, ifp->name);
}
if (dst != INADDR_BROADCAST)
@ -355,8 +359,8 @@ void send_packet(struct interface *ifp, struct stream *s, uint32_t dst,
sockopt_iphdrincl_swab_htosys(ip);
if (sendmsg(irdp_sock, msg, 0) < 0) {
zlog_debug("sendto %s", safe_strerror(errno));
}
/* printf("TX on %s idx %d\n", ifp->name, ifp->ifindex); */
if (sendmsg(irdp_sock, msg, 0) < 0)
flog_err(EC_LIB_SOCKET,
"IRDP: sendmsg send failure %s(%d) on %s",
safe_strerror(errno), errno, ifp->name);
}