diff options
| author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2025-01-23 15:13:01 -0300 |
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2025-01-23 15:13:01 -0300 |
| commit | 5846339eae91b83cf2c78cfab2e5c1a1013f456e (patch) | |
| tree | 23f2e8ac9aff96f710e4e08775239341e561c849 /bgpd | |
| parent | 36b94dcc7bbfd0735966820bcb8036aecbe34584 (diff) | |
bgpd,lib: document the table id / instance usage
Document where relevant about the instance overload to table ID so users
know what to expect.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'bgpd')
| -rw-r--r-- | bgpd/bgp_zebra.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 3d7481f630..179404a2ce 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -2043,6 +2043,18 @@ int bgp_redistribute_set(struct bgp *bgp, afi_t afi, int type, /* Return if already redistribute flag is set. */ if (instance) { if (type == ZEBRA_ROUTE_TABLE_DIRECT) { + /* + * When redistribution type is `table-direct` the + * instance means `table identification`. + * + * `table_id` support 32bit integers, however since + * `instance` is being overloaded to `table_id` it + * will only be possible to use the first 65535 + * entries. + * + * Also the ZAPI must also support `int` + * (see `zebra_redistribute_add`). + */ struct redist_table_direct table = { .table_id = instance, .vrf_id = bgp->vrf_id, |
