diff --git a/pbrd/pbr_zebra.c b/pbrd/pbr_zebra.c index dd15beaff4..277271c6b6 100644 --- a/pbrd/pbr_zebra.c +++ b/pbrd/pbr_zebra.c @@ -135,9 +135,11 @@ static int route_notify_owner(ZAPI_CALLBACK_ARGS) enum zapi_route_notify_owner note; uint32_t table_id; - if (!zapi_route_notify_decode(zclient->ibuf, &p, &table_id, ¬e, - NULL, NULL)) + if (!zapi_route_notify_decode(zclient->ibuf, &p, &table_id, ¬e, NULL, NULL)) { + DEBUGD(&pbr_dbg_zebra, "%s: Received Notification for which PBR could not decode", + __func__); return -1; + } switch (note) { case ZAPI_ROUTE_FAIL_INSTALL: @@ -236,8 +238,6 @@ static void route_add_helper(struct zapi_route *api, struct nexthop_group nhg, api->prefix.family = install_afi; - DEBUGD(&pbr_dbg_zebra, " Encoding %pFX", &api->prefix); - i = 0; for (ALL_NEXTHOPS(nhg, nhop)) { api_nh = &api->nexthops[i]; @@ -284,10 +284,10 @@ void route_add(struct pbr_nexthop_group_cache *pnhgc, struct nexthop_group nhg, { struct zapi_route api; - DEBUGD(&pbr_dbg_zebra, "%s for Table: %d", __func__, pnhgc->table_id); - memset(&api, 0, sizeof(api)); + DEBUGD(&pbr_dbg_zebra, "%s %pFX for Table: %d", __func__, &api.prefix, pnhgc->table_id); + api.vrf_id = VRF_DEFAULT; api.type = ZEBRA_ROUTE_PBR; api.safi = SAFI_UNICAST; diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index e9d554ba3d..be19256c40 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -620,11 +620,9 @@ int zsend_redistribute_route(int cmd, struct zserv *client, const struct route_n } if (IS_ZEBRA_DEBUG_SEND) - zlog_debug("%s: %s to client %s: type %s, vrf_id %d, p %pFX", - __func__, zserv_command_string(cmd), - zebra_route_string(client->proto), - zebra_route_string(api.type), api.vrf_id, - &api.prefix); + zlog_debug("%s: %s to client %s: type %s, vrf_id %d, table %u, p %pFX", __func__, + zserv_command_string(cmd), zebra_route_string(client->proto), + zebra_route_string(api.type), api.vrf_id, api.tableid, &api.prefix); return zserv_send_message(client, s); } @@ -758,9 +756,8 @@ static int route_notify_internal(const struct route_node *rn, int type, } if (IS_ZEBRA_DEBUG_PACKET) - zlog_debug( - "Notifying Owner: %s about prefix %pRN(%u) %d vrf: %u", - zebra_route_string(type), rn, table_id, note, vrf_id); + zlog_debug("Notifying Owner: %s about prefix %pRN(%u) %d vrf: %u Table: %u", + zebra_route_string(type), rn, table_id, note, vrf_id, table_id); /* We're just allocating a small-ish buffer here, since we only * encode a small amount of data. @@ -2163,11 +2160,10 @@ static void zread_route_add(ZAPI_HANDLER_ARGS) if (!CHECK_FLAG(api.message, ZAPI_MESSAGE_NHG) && (!CHECK_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP) || api.nexthop_num == 0)) { - flog_warn( - EC_ZEBRA_RX_ROUTE_NO_NEXTHOPS, - "%s: received a route without nexthops for prefix %pFX from client %s", - __func__, &api.prefix, - zebra_route_string(client->proto)); + flog_warn(EC_ZEBRA_RX_ROUTE_NO_NEXTHOPS, + "%s: received a route without nexthops for prefix (%s:%u)%pFX from client %s", + __func__, zvrf_name(zvrf), api.tableid, &api.prefix, + zebra_route_string(client->proto)); zebra_rib_route_entry_free(re); return; @@ -2177,10 +2173,9 @@ static void zread_route_add(ZAPI_HANDLER_ARGS) if (CHECK_FLAG(api.message, ZAPI_MESSAGE_BACKUP_NEXTHOPS) && api.backup_nexthop_num == 0) { if (IS_ZEBRA_DEBUG_RECV || IS_ZEBRA_DEBUG_EVENT) - zlog_debug( - "%s: client %s: BACKUP flag set but no backup nexthops, prefix %pFX", - __func__, zebra_route_string(client->proto), - &api.prefix); + zlog_debug("%s: client %s: BACKUP flag set but no backup nexthops, prefix %pFX(%s:%u)", + __func__, zebra_route_string(client->proto), &api.prefix, + zvrf_name(zvrf), api.tableid); } if (!re->nhe_id