summaryrefslogtreecommitdiff
path: root/bgpd/bgp_table.h
diff options
context:
space:
mode:
authorG. Paul Ziemba <paulz@labn.net>2018-03-23 16:57:03 -0700
committerG. Paul Ziemba <paulz@labn.net>2018-04-04 10:00:23 -0700
commit960035b2d9e8300c91276922158b806b043e2e9b (patch)
treeb365c75fdeb3bc2ac4ed3ff95f22dd6a56726634 /bgpd/bgp_table.h
parent3572fb26ca35151b291f335074ae41deb291b466 (diff)
bgpd: nexthop tracking with labels for vrf-vpn leaking
Routes that have labels must be sent via a nexthop that also has labels. This change notes whether any path in a nexthop update from zebra contains labels. If so, then the nexthop is valid for routes that have labels. If a nexthop update has no labeled paths, then any labeled routes referencing the nexthop are marked not valid. Add a route flag BGP_INFO_ANNC_NH_SELF that means "advertise myself as nexthop when announcing" so that we can track our notion of the nexthop without revealing it to peers. Signed-off-by: G. Paul Ziemba <paulz@labn.net>
Diffstat (limited to 'bgpd/bgp_table.h')
-rw-r--r--bgpd/bgp_table.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgp_table.h b/bgpd/bgp_table.h
index 9afc2adbb0..388c247227 100644
--- a/bgpd/bgp_table.h
+++ b/bgpd/bgp_table.h
@@ -26,6 +26,9 @@
#include "queue.h"
struct bgp_table {
+ /* table belongs to this instance */
+ struct bgp *bgp;
+
/* afi/safi of this table */
afi_t afi;
safi_t safi;
@@ -75,7 +78,7 @@ typedef struct bgp_table_iter_t_ {
route_table_iter_t rt_iter;
} bgp_table_iter_t;
-extern struct bgp_table *bgp_table_init(afi_t, safi_t);
+extern struct bgp_table *bgp_table_init(struct bgp *bgp, afi_t, safi_t);
extern void bgp_table_lock(struct bgp_table *);
extern void bgp_table_unlock(struct bgp_table *);
extern void bgp_table_finish(struct bgp_table **);