From 7c26c12106c9176adb5df26debf97e016035101f Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Tue, 26 Mar 2019 18:23:58 -0700 Subject: [PATCH] zebra: add debug in specific neigh fetch add debug trace in specific neigh request send api to help debug an issue where synchronous response parse returns with NLMSG_DONE where there is no ipv6 neigh received. the count value is set to 1 because the request contained a spcific neigh. Signed-off-by: Chirag Shah --- zebra/rt_netlink.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 7011342ab4..08d229619f 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -3285,6 +3285,15 @@ static int netlink_request_specific_neigh_in_vlan(struct zebra_ns *zns, addattr_l(&req.n, sizeof(req), NDA_DST, &ip->ip.addr, ipa_len); + if (IS_ZEBRA_DEBUG_KERNEL) { + char buf[INET6_ADDRSTRLEN]; + + zlog_debug("%s: Tx %s family %s IF %u IP %s flags 0x%x", + __func__, nl_msg_type_to_str(type), + nl_family_to_str(req.ndm.ndm_family), ifindex, + ipaddr2str(ip, buf, sizeof(buf)), req.n.nlmsg_flags); + } + return netlink_request(&zns->netlink_cmd, &req.n); } -- 2.39.5