From 062fd00ad6ca94f1088a75ef2c425d2263baa9cd Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Fri, 14 Feb 2025 17:22:00 +0100 Subject: [PATCH] staticd: Extend SRv6 SIDs show CLI to display uA SIDs This commit extends the SRv6 SIDs show CLI to display the configured SRv6 uA SIDs. ``` segment-routing srv6 static-sids sid fcbb:bbbb:1:fe40::/64 locator MAIN behavior uA interface sr0 nexthop 2001::2 ! ! ! ``` Signed-off-by: Carmine Scarpitta --- staticd/static_vty.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/staticd/static_vty.c b/staticd/static_vty.c index 39776a4143..6e9087363d 100644 --- a/staticd/static_vty.c +++ b/staticd/static_vty.c @@ -1716,6 +1716,7 @@ static void srv6_sid_cli_show(struct vty *vty, const struct lyd_node *sid, bool { enum srv6_endpoint_behavior_codepoint srv6_behavior; struct prefix_ipv6 sid_value; + struct ipaddr nexthop; yang_dnode_get_ipv6p(&sid_value, sid, "sid"); @@ -1787,6 +1788,16 @@ static void srv6_sid_cli_show(struct vty *vty, const struct lyd_node *sid, bool if (yang_dnode_exists(sid, "vrf-name")) vty_out(vty, " vrf %s", yang_dnode_get_string(sid, "vrf-name")); + if (yang_dnode_exists(sid, "paths[path-index=0]/interface")) { + vty_out(vty, " interface %s", + yang_dnode_get_string(sid, "paths[path-index=0]/interface")); + + if (yang_dnode_exists(sid, "paths[path-index=0]/next-hop")) { + yang_dnode_get_ip(&nexthop, sid, "paths[path-index=0]/next-hop"); + vty_out(vty, " nexthop %pI6", &nexthop.ipaddr_v6); + } + } + vty_out(vty, "\n"); } -- 2.39.5