From b7d7599ce3576f28310af18b403fed49a0840b67 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 13 Aug 2019 18:22:07 +0200 Subject: BGP: implement Adj-RIB-Out The patch implements optional internal export table to a channel and hooks it to BGP so it can be used as Adj-RIB-Out. When enabled, all exported (post-filtered) routes are stored there. An export table can be examined using e.g. 'show route export table bgp1.ipv4'. --- proto/bgp/bgp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'proto/bgp/bgp.c') diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index c08e5ee9..01f61e81 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -1721,6 +1721,9 @@ bgp_channel_start(struct channel *C) if (c->cf->import_table) channel_setup_in_table(C); + if (c->cf->export_table) + channel_setup_out_table(C); + c->stale_timer = tm_new_init(c->pool, bgp_long_lived_stale_timeout, c, 0, 0); c->next_hop_addr = c->cf->next_hop_addr; @@ -2067,6 +2070,7 @@ bgp_channel_reconfigure(struct channel *C, struct channel_config *CC, int *impor (new->ext_next_hop != old->ext_next_hop) || (new->add_path != old->add_path) || (new->import_table != old->import_table) || + (new->export_table != old->export_table) || (IGP_TABLE(new, ip4) != IGP_TABLE(old, ip4)) || (IGP_TABLE(new, ip6) != IGP_TABLE(old, ip6))) return 0; -- cgit v1.2.3