mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 22:03:12 +00:00
Merge pull request #18142 from donaldsharp/vrf_tableid_debugs
Vrf tableid debugs
This commit is contained in:
commit
5d8bef6442
@ -135,9 +135,11 @@ static int route_notify_owner(ZAPI_CALLBACK_ARGS)
|
|||||||
enum zapi_route_notify_owner note;
|
enum zapi_route_notify_owner note;
|
||||||
uint32_t table_id;
|
uint32_t table_id;
|
||||||
|
|
||||||
if (!zapi_route_notify_decode(zclient->ibuf, &p, &table_id, ¬e,
|
if (!zapi_route_notify_decode(zclient->ibuf, &p, &table_id, ¬e, NULL, NULL)) {
|
||||||
NULL, NULL))
|
DEBUGD(&pbr_dbg_zebra, "%s: Received Notification for which PBR could not decode",
|
||||||
|
__func__);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
switch (note) {
|
switch (note) {
|
||||||
case ZAPI_ROUTE_FAIL_INSTALL:
|
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;
|
api->prefix.family = install_afi;
|
||||||
|
|
||||||
DEBUGD(&pbr_dbg_zebra, " Encoding %pFX", &api->prefix);
|
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
for (ALL_NEXTHOPS(nhg, nhop)) {
|
for (ALL_NEXTHOPS(nhg, nhop)) {
|
||||||
api_nh = &api->nexthops[i];
|
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;
|
struct zapi_route api;
|
||||||
|
|
||||||
DEBUGD(&pbr_dbg_zebra, "%s for Table: %d", __func__, pnhgc->table_id);
|
|
||||||
|
|
||||||
memset(&api, 0, sizeof(api));
|
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.vrf_id = VRF_DEFAULT;
|
||||||
api.type = ZEBRA_ROUTE_PBR;
|
api.type = ZEBRA_ROUTE_PBR;
|
||||||
api.safi = SAFI_UNICAST;
|
api.safi = SAFI_UNICAST;
|
||||||
|
@ -620,11 +620,9 @@ int zsend_redistribute_route(int cmd, struct zserv *client, const struct route_n
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ZEBRA_DEBUG_SEND)
|
if (IS_ZEBRA_DEBUG_SEND)
|
||||||
zlog_debug("%s: %s to client %s: type %s, vrf_id %d, p %pFX",
|
zlog_debug("%s: %s to client %s: type %s, vrf_id %d, table %u, p %pFX", __func__,
|
||||||
__func__, zserv_command_string(cmd),
|
zserv_command_string(cmd), zebra_route_string(client->proto),
|
||||||
zebra_route_string(client->proto),
|
zebra_route_string(api.type), api.vrf_id, api.tableid, &api.prefix);
|
||||||
zebra_route_string(api.type), api.vrf_id,
|
|
||||||
&api.prefix);
|
|
||||||
return zserv_send_message(client, s);
|
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)
|
if (IS_ZEBRA_DEBUG_PACKET)
|
||||||
zlog_debug(
|
zlog_debug("Notifying Owner: %s about prefix %pRN(%u) %d vrf: %u Table: %u",
|
||||||
"Notifying Owner: %s about prefix %pRN(%u) %d vrf: %u",
|
zebra_route_string(type), rn, table_id, note, vrf_id, table_id);
|
||||||
zebra_route_string(type), rn, table_id, note, vrf_id);
|
|
||||||
|
|
||||||
/* We're just allocating a small-ish buffer here, since we only
|
/* We're just allocating a small-ish buffer here, since we only
|
||||||
* encode a small amount of data.
|
* 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)
|
if (!CHECK_FLAG(api.message, ZAPI_MESSAGE_NHG)
|
||||||
&& (!CHECK_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP)
|
&& (!CHECK_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP)
|
||||||
|| api.nexthop_num == 0)) {
|
|| api.nexthop_num == 0)) {
|
||||||
flog_warn(
|
flog_warn(EC_ZEBRA_RX_ROUTE_NO_NEXTHOPS,
|
||||||
EC_ZEBRA_RX_ROUTE_NO_NEXTHOPS,
|
"%s: received a route without nexthops for prefix (%s:%u)%pFX from client %s",
|
||||||
"%s: received a route without nexthops for prefix %pFX from client %s",
|
__func__, zvrf_name(zvrf), api.tableid, &api.prefix,
|
||||||
__func__, &api.prefix,
|
zebra_route_string(client->proto));
|
||||||
zebra_route_string(client->proto));
|
|
||||||
|
|
||||||
zebra_rib_route_entry_free(re);
|
zebra_rib_route_entry_free(re);
|
||||||
return;
|
return;
|
||||||
@ -2177,10 +2173,9 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
|
|||||||
if (CHECK_FLAG(api.message, ZAPI_MESSAGE_BACKUP_NEXTHOPS)
|
if (CHECK_FLAG(api.message, ZAPI_MESSAGE_BACKUP_NEXTHOPS)
|
||||||
&& api.backup_nexthop_num == 0) {
|
&& api.backup_nexthop_num == 0) {
|
||||||
if (IS_ZEBRA_DEBUG_RECV || IS_ZEBRA_DEBUG_EVENT)
|
if (IS_ZEBRA_DEBUG_RECV || IS_ZEBRA_DEBUG_EVENT)
|
||||||
zlog_debug(
|
zlog_debug("%s: client %s: BACKUP flag set but no backup nexthops, prefix %pFX(%s:%u)",
|
||||||
"%s: client %s: BACKUP flag set but no backup nexthops, prefix %pFX",
|
__func__, zebra_route_string(client->proto), &api.prefix,
|
||||||
__func__, zebra_route_string(client->proto),
|
zvrf_name(zvrf), api.tableid);
|
||||||
&api.prefix);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!re->nhe_id
|
if (!re->nhe_id
|
||||||
|
Loading…
Reference in New Issue
Block a user