From 31f937fb43f4920d14de6193de440279fbd5d99e Mon Sep 17 00:00:00 2001 From: Sebastien Merle Date: Mon, 20 Jul 2020 13:43:54 +0200 Subject: lib, zebra: Add SR-TE policy infrastructure to zebra For the sake of Segment Routing (SR) and Traffic Engineering (TE) Policies there's a need for additional infrastructure within zebra. The infrastructure in this PR is supposed to manage such policies in terms of installing binding SIDs and LSPs. Also it is capable of managing MPLS labels using the label manager, keeping track of nexthops (for resolving labels) and notifying interested parties about changes of a policy/LSP state. Further it enables a route map mechanism for BGP and SR-TE colors such that learned BGP routes can be mapped onto SR-TE Policies. This PR does not introduce any usable features by now, it is just infrastructure for other upcoming PRs which will introduce 'pathd', a new SR-TE daemon. Co-authored-by: Renato Westphal Co-authored-by: GalaxyGorilla Signed-off-by: Sebastien Merle --- zebra/zebra_vty.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'zebra/zebra_vty.c') diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 2ea04eee2..fc1eb6223 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -562,6 +562,10 @@ static void show_route_nexthop_helper(struct vty *vty, if (inet_ntop(AF_INET, &nexthop->src.ipv4, buf, sizeof(buf))) vty_out(vty, ", src %s", buf); + /* SR-TE information */ + if (nexthop->srte_color) + vty_out(vty, ", SR-TE color %u", + nexthop->srte_color); } break; case NEXTHOP_TYPE_IPV6: @@ -781,6 +785,9 @@ static void show_nexthop_json_helper(json_object *json_nexthop, json_object_int_add(json_nexthop, "weight", nexthop->weight); + if (nexthop->srte_color) + json_object_int_add(json_nexthop, "srteColor", + nexthop->srte_color); } static void vty_show_ip_route(struct vty *vty, struct route_node *rn, -- cgit v1.2.3