summaryrefslogtreecommitdiff
path: root/staticd
diff options
context:
space:
mode:
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");
}