summaryrefslogtreecommitdiff
path: root/staticd/static_routes.c
diff options
context:
space:
mode:
authorSebastien Merle <sebastien@netdef.org>2020-02-14 14:49:25 +0000
committerSebastien Merle <sebastien@netdef.org>2020-08-12 13:28:48 +0200
commit065276ae1f437c54b33ebcc2201bf105bae39dda (patch)
treea834df39aa4aaf4644ad16e3cd0a3abb666506eb /staticd/static_routes.c
parentb2a18903e7108ae42c523dacdd00bf19d8ea1f1c (diff)
staticd: add support for SR Policies
Configuration example: ip route 9.9.9.9/32 6.6.6.6 color 123 The SR Policy to be chosen is uniquely identified by the policy endpoint (6.6.6.6) and the SR-TE color (123). Traffic will be augmented with an MPLS label stack according to the active candidate path of that particular policy. Co-authored-by: GalaxyGorilla <sascha@netdef.org> Signed-off-by: Sebastien Merle <sebastien@netdef.org>
Diffstat (limited to 'staticd/static_routes.c')
-rw-r--r--staticd/static_routes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/staticd/static_routes.c b/staticd/static_routes.c
index 3836109e36..d9f2faabaf 100644
--- a/staticd/static_routes.c
+++ b/staticd/static_routes.c
@@ -200,7 +200,7 @@ struct static_nexthop *
static_add_nexthop(struct route_node *rn, struct static_path *pn, safi_t safi,
struct static_vrf *svrf, static_types type,
struct ipaddr *ipaddr, const char *ifname,
- const char *nh_vrf)
+ const char *nh_vrf, uint32_t color)
{
struct static_nexthop *nh;
struct static_vrf *nh_svrf;
@@ -218,6 +218,7 @@ static_add_nexthop(struct route_node *rn, struct static_path *pn, safi_t safi,
nh = XCALLOC(MTYPE_STATIC_NEXTHOP, sizeof(struct static_nexthop));
nh->type = type;
+ nh->color = color;
nh->nh_vrf_id = nh_svrf->vrf->vrf_id;
strlcpy(nh->nh_vrfname, nh_svrf->vrf->name, sizeof(nh->nh_vrfname));