mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-31 03:08:23 +00:00
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
This commit is contained in:
commit
1a5d323c02
@ -2587,34 +2587,35 @@ vty_show_ip_route_summary (struct vty *vty, struct route_table *table)
|
|||||||
{
|
{
|
||||||
struct route_node *rn;
|
struct route_node *rn;
|
||||||
struct rib *rib;
|
struct rib *rib;
|
||||||
struct nexthop *nexthop;
|
|
||||||
#define ZEBRA_ROUTE_IBGP ZEBRA_ROUTE_MAX
|
#define ZEBRA_ROUTE_IBGP ZEBRA_ROUTE_MAX
|
||||||
#define ZEBRA_ROUTE_TOTAL (ZEBRA_ROUTE_IBGP + 1)
|
#define ZEBRA_ROUTE_TOTAL (ZEBRA_ROUTE_IBGP + 1)
|
||||||
u_int32_t rib_cnt[ZEBRA_ROUTE_TOTAL + 1];
|
u_int32_t rib_cnt[ZEBRA_ROUTE_TOTAL + 1];
|
||||||
u_int32_t fib_cnt[ZEBRA_ROUTE_TOTAL + 1];
|
u_int32_t fib_cnt[ZEBRA_ROUTE_TOTAL + 1];
|
||||||
u_int32_t i;
|
u_int32_t i;
|
||||||
|
u_int32_t is_ibgp;
|
||||||
|
|
||||||
memset (&rib_cnt, 0, sizeof(rib_cnt));
|
memset (&rib_cnt, 0, sizeof(rib_cnt));
|
||||||
memset (&fib_cnt, 0, sizeof(fib_cnt));
|
memset (&fib_cnt, 0, sizeof(fib_cnt));
|
||||||
for (rn = route_top (table); rn; rn = route_next (rn))
|
for (rn = route_top (table); rn; rn = route_next (rn))
|
||||||
RNODE_FOREACH_RIB (rn, rib)
|
RNODE_FOREACH_RIB (rn, rib)
|
||||||
for (nexthop = rib->nexthop; nexthop; nexthop = nexthop->next)
|
|
||||||
{
|
{
|
||||||
|
is_ibgp = (rib->type == ZEBRA_ROUTE_BGP &&
|
||||||
|
CHECK_FLAG (rib->flags, ZEBRA_FLAG_IBGP));
|
||||||
|
|
||||||
rib_cnt[ZEBRA_ROUTE_TOTAL]++;
|
rib_cnt[ZEBRA_ROUTE_TOTAL]++;
|
||||||
|
if (is_ibgp)
|
||||||
|
rib_cnt[ZEBRA_ROUTE_IBGP]++;
|
||||||
|
else
|
||||||
rib_cnt[rib->type]++;
|
rib_cnt[rib->type]++;
|
||||||
if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB)
|
|
||||||
|| nexthop_has_fib_child(nexthop))
|
if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_SELECTED))
|
||||||
{
|
{
|
||||||
fib_cnt[ZEBRA_ROUTE_TOTAL]++;
|
fib_cnt[ZEBRA_ROUTE_TOTAL]++;
|
||||||
fib_cnt[rib->type]++;
|
|
||||||
}
|
if (is_ibgp)
|
||||||
if (rib->type == ZEBRA_ROUTE_BGP &&
|
|
||||||
CHECK_FLAG (rib->flags, ZEBRA_FLAG_IBGP))
|
|
||||||
{
|
|
||||||
rib_cnt[ZEBRA_ROUTE_IBGP]++;
|
|
||||||
if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB)
|
|
||||||
|| nexthop_has_fib_child(nexthop))
|
|
||||||
fib_cnt[ZEBRA_ROUTE_IBGP]++;
|
fib_cnt[ZEBRA_ROUTE_IBGP]++;
|
||||||
|
else
|
||||||
|
fib_cnt[rib->type]++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user