summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-07-02 09:53:59 -0400
committerPaul Jakma <paul@quagga.net>2015-08-21 17:25:18 +0100
commitd2c6da209cec42c05941eff52d88f0ed7eabad48 (patch)
tree31f1258990cc7d83442a057bec90c2ac57888cac
parenta031c4dd72514232296e9a570c3d701f5f33ad63 (diff)
downloadquagga-d2c6da209cec42c05941eff52d88f0ed7eabad48.tar.bz2
quagga-d2c6da209cec42c05941eff52d88f0ed7eabad48.tar.xz
pimd: Change ioctl call failure from vty_out to zlog_warn
The command 'show ip multicast' when run, iterates over all interfaces on the router, if you do not have pim configured on that interface it would generate an error message: Interface Address ifi Vif PktsIn PktsOut BytesIn BytesOut br1 20.0.15.1 7 7 0 0 0 0 swp1 169.254.0.10 3 3 0 0 0 0 swp2 169.254.0.26 4 4 0 0 0 0 ioctl(SIOCGETVIFCNT=35296) failure for interface swp3 vif_index=-1: errno=22: Invalid argument ioctl(SIOCGETVIFCNT=35296) failure for interface swp4 vif_index=-1: errno=22: Invalid argument This fixes the issue to display this instead: Interface Address ifi Vif PktsIn PktsOut BytesIn BytesOut br1 20.0.15.1 7 7 0 0 0 0 swp1 169.254.0.10 3 3 0 0 0 0 swp2 169.254.0.26 4 4 0 0 0 0 swp3 0.0.0.0 5 -1 0 0 0 0 swp4 0.0.0.0 6 -1 0 0 0 0 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--pimd/pim_cmd.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 9833411d..33644540 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -2070,16 +2070,13 @@ static void show_multicast_interfaces(struct vty *vty)
vreq.vifi = pim_ifp->mroute_vif_index;
if (ioctl(qpim_mroute_socket_fd, SIOCGETVIFCNT, &vreq)) {
- int e = errno;
- vty_out(vty,
- "ioctl(SIOCGETVIFCNT=%lu) failure for interface %s vif_index=%d: errno=%d: %s%s",
- (unsigned long)SIOCGETVIFCNT,
- ifp->name,
- pim_ifp->mroute_vif_index,
- e,
- safe_strerror(e),
- VTY_NEWLINE);
- continue;
+ zlog_warn("ioctl(SIOCGETVIFCNT=%lu) failure for interface %s vif_index=%d: errno=%d: %s%s",
+ (unsigned long)SIOCGETVIFCNT,
+ ifp->name,
+ pim_ifp->mroute_vif_index,
+ errno,
+ safe_strerror(errno),
+ VTY_NEWLINE);
}
ifaddr = pim_ifp->primary_address;