From: Donald Sharp Date: Tue, 27 Sep 2016 02:27:37 +0000 (-0400) Subject: zebra: Fix up the debug for receiving multicast routes X-Git-Tag: frr-3.0-branchpoint~64^2~10^2~199 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=82d64e8ef41be04a63dbbdd55e153441e7b15116;p=mirror%2Ffrr.git zebra: Fix up the debug for receiving multicast routes Improve the netlink debug message. Signed-off-by: Donald Sharp --- diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 5dc9a10e29..b968a84e76 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -525,7 +525,6 @@ netlink_route_change_read_multicast (struct sockaddr_nl *snl, struct nlmsghdr *h ns_id_t ns_id) { int len; - unsigned long long lastused = 0; struct rtmsg *rtm; struct rtattr *tb[RTA_MAX + 1]; struct mcast_route_data *m; @@ -584,18 +583,20 @@ netlink_route_change_read_multicast (struct sockaddr_nl *snl, struct nlmsghdr *h if (IS_ZEBRA_DEBUG_KERNEL) { + struct interface *ifp; strcpy (sbuf, inet_ntoa (m->sg.src)); strcpy (gbuf, inet_ntoa (m->sg.grp)); for (count = 0; count < oif_count; count++) { - struct interface *ifp = if_lookup_by_index_vrf (oif[count], vrf); + ifp = if_lookup_by_index_vrf (oif[count], vrf); char temp[256]; sprintf (temp, "%s ", ifp->name); strcat (oif_list, temp); } - zlog_debug ("MCAST %s (%s,%s) IIF: %d OIF: %s jiffies: %lld", - nl_msg_type_to_str (h->nlmsg_type), sbuf, gbuf, iif, oif_list, lastused); + ifp = if_lookup_by_index_vrf (iif, vrf); + zlog_debug ("MCAST %s (%s,%s) IIF: %s OIF: %s jiffies: %lld", + nl_msg_type_to_str(h->nlmsg_type), sbuf, gbuf, ifp->name, oif_list, m->lastused); } return 0; }