]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Fix zlog_debug -> flog_err for error situations in IRDP
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 18 Feb 2020 00:31:57 +0000 (19:31 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 18 Feb 2020 14:34:18 +0000 (09:34 -0500)
In several places we would send debug messages for failure situations
that really should be errors.

Signed-off-by: Donald Sharpd <sharpd@cumulusnetworks.com>
zebra/irdp_packet.c

index ae11bc5a6489dfc97ab17bbd2077d4954c41bd54..450dfbece311480ff5288f84d26efafccdd77d37 100644 (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);
 }