summaryrefslogtreecommitdiff
path: root/bgpd/bgp_nexthop.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2020-08-26 14:39:33 -0300
committerGalaxyGorilla <sascha@netdef.org>2020-08-31 09:11:03 +0000
commit545aeef1d13ec29c14713450deea24d6f8810af2 (patch)
treeeca9c671b38463f62fcec8ef9327ef41a9d3ded7 /bgpd/bgp_nexthop.h
parentef3e0d04766a11d1b976807c42da8207e887174e (diff)
bgpd: extend the NHT code to understand SR-TE colors
Extend the NHT code so that only the affected BGP routes are affected whenever an SR-policy is updated on zebra. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_nexthop.h')
-rw-r--r--bgpd/bgp_nexthop.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/bgpd/bgp_nexthop.h b/bgpd/bgp_nexthop.h
index e235fe4727..356af54002 100644
--- a/bgpd/bgp_nexthop.h
+++ b/bgpd/bgp_nexthop.h
@@ -70,6 +70,7 @@ struct bgp_nexthop_cache {
/* Back pointer to the cache tree this entry belongs to. */
struct bgp_nexthop_cache_head *tree;
+ uint32_t srte_color;
struct prefix prefix;
void *nht_info; /* In BGP, peer session */
LIST_HEAD(path_list, bgp_path_info) paths;
@@ -115,10 +116,12 @@ extern bool bgp_nexthop_self(struct bgp *bgp, afi_t afi, uint8_t type,
uint8_t sub_type, struct attr *attr,
struct bgp_dest *dest);
extern struct bgp_nexthop_cache *bnc_new(struct bgp_nexthop_cache_head *tree,
- struct prefix *prefix);
+ struct prefix *prefix,
+ uint32_t srte_color);
extern void bnc_free(struct bgp_nexthop_cache *bnc);
extern struct bgp_nexthop_cache *bnc_find(struct bgp_nexthop_cache_head *tree,
- struct prefix *prefix);
+ struct prefix *prefix,
+ uint32_t srte_color);
extern void bnc_nexthop_free(struct bgp_nexthop_cache *bnc);
extern const char *bnc_str(struct bgp_nexthop_cache *bnc, char *buf, int size);
extern void bgp_scan_init(struct bgp *bgp);