summaryrefslogtreecommitdiff
path: root/staticd
diff options
context:
space:
mode:
authorCarmine Scarpitta <cscarpit@cisco.com>2025-02-14 17:22:00 +0100
committerCarmine Scarpitta <cscarpit@cisco.com>2025-02-26 07:19:52 +0100
commit062fd00ad6ca94f1088a75ef2c425d2263baa9cd (patch)
tree1d29584705c6227a4925ce7e5d8e7a06c5351a92 /staticd
parentf2fcdaad3a18c096c5356ff745ab39c70d67adc5 (diff)
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 <cscarpit@cisco.com>
Diffstat (limited to 'staticd')
-rw-r--r--staticd/static_vty.c11
1 files changed, 11 insertions, 0 deletions
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");
}