]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Check return code of pim_msg_send()
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 24 Oct 2019 23:31:27 +0000 (19:31 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 24 Oct 2019 23:31:27 +0000 (19:31 -0400)
The pim_msg_send() return code was not being checked.  Make
consistent with it's usage everywhere else.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_bsm.c

index 675092dbec18e748bff8aa0f66dbe53bd7595d9e..ffaa858fa7f8e659647136d0b36c8fb29be50b4a 100644 (file)
@@ -683,8 +683,13 @@ static bool pim_bsm_send_intf(uint8_t *buf, int len, struct interface *ifp,
                return false;
        }
 
-       pim_msg_send(pim_ifp->pim_sock_fd, pim_ifp->primary_address, dst_addr,
-                    buf, len, ifp->name);
+       if (pim_msg_send(pim_ifp->pim_sock_fd, pim_ifp->primary_address,
+                        dst_addr, buf, len, ifp->name)) {
+               zlog_warn("%s: Could not send BSM message on interface: %s",
+                         __PRETTY_FUNCTION__, ifp->name);
+               return false;
+       }
+
        pim_ifp->pim_ifstat_bsm_tx++;
        pim_ifp->pim->bsm_sent++;
        return true;