diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2023-12-29 07:08:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-29 07:08:30 +0200 |
| commit | 353ee7bb819d5f06a180a1d062b47006456a98c7 (patch) | |
| tree | afcd3eff7e5ddd881681fe0ac213ea419640751c /zebra/zebra_router.c | |
| parent | 080299fe10b7434602b8e419aa4283e4312cf587 (diff) | |
| parent | f7258386dba9100f399207a1ab2aa2b90111b364 (diff) | |
Merge pull request #14492 from LabNConsulting/oper-state
oper state
Diffstat (limited to 'zebra/zebra_router.c')
| -rw-r--r-- | zebra/zebra_router.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c index 6271d029fb..3fd4e6eb1f 100644 --- a/zebra/zebra_router.c +++ b/zebra/zebra_router.c @@ -70,6 +70,26 @@ struct zebra_router_table *zebra_router_find_zrt(struct zebra_vrf *zvrf, return zrt; } +struct zebra_router_table *zebra_router_find_next_zrt(struct zebra_vrf *zvrf, + uint32_t tableid, + afi_t afi, safi_t safi) +{ + struct zebra_router_table finder; + struct zebra_router_table *zrt; + + memset(&finder, 0, sizeof(finder)); + finder.afi = afi; + finder.safi = safi; + finder.tableid = tableid; + finder.ns_id = zvrf->zns->ns_id; + zrt = RB_NFIND(zebra_router_table_head, &zrouter.tables, &finder); + if (zrt->afi == afi && zrt->safi == safi && zrt->tableid == tableid && + zrt->ns_id == finder.ns_id) + zrt = RB_NEXT(zebra_router_table_head, zrt); + + return zrt; +} + struct route_table *zebra_router_find_table(struct zebra_vrf *zvrf, uint32_t tableid, afi_t afi, safi_t safi) |
