summaryrefslogtreecommitdiff
path: root/zebra/zebra_srv6_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_srv6_vty.c')
-rw-r--r--zebra/zebra_srv6_vty.c35
1 files changed, 26 insertions, 9 deletions
diff --git a/zebra/zebra_srv6_vty.c b/zebra/zebra_srv6_vty.c
index d5cd30e64b..ddb0922475 100644
--- a/zebra/zebra_srv6_vty.c
+++ b/zebra/zebra_srv6_vty.c
@@ -198,15 +198,32 @@ DEFUN (show_srv6_locator_detail,
prefix2str(&locator->prefix, str, sizeof(str));
vty_out(vty, "Name: %s\n", locator->name);
vty_out(vty, "Prefix: %s\n", str);
- vty_out(vty, "Block-Bit-Len: %u\n", locator->block_bits_length);
- vty_out(vty, "Node-Bit-Len: %u\n", locator->node_bits_length);
- vty_out(vty, "Function-Bit-Len: %u\n",
- locator->function_bits_length);
- vty_out(vty, "Argument-Bit-Len: %u\n",
- locator->argument_bits_length);
-
- if (CHECK_FLAG(locator->flags, SRV6_LOCATOR_USID))
- vty_out(vty, "Behavior: uSID\n");
+ if (locator->sid_format) {
+ vty_out(vty, "Block-Bit-Len: %u\n",
+ locator->sid_format->block_len);
+ vty_out(vty, "Node-Bit-Len: %u\n",
+ locator->sid_format->node_len);
+ vty_out(vty, "Function-Bit-Len: %u\n",
+ locator->sid_format->function_len);
+ vty_out(vty, "Argument-Bit-Len: %u\n",
+ locator->sid_format->argument_len);
+
+ if (locator->sid_format->type ==
+ SRV6_SID_FORMAT_TYPE_USID)
+ vty_out(vty, "Behavior: uSID\n");
+ } else {
+ vty_out(vty, "Block-Bit-Len: %u\n",
+ locator->block_bits_length);
+ vty_out(vty, "Node-Bit-Len: %u\n",
+ locator->node_bits_length);
+ vty_out(vty, "Function-Bit-Len: %u\n",
+ locator->function_bits_length);
+ vty_out(vty, "Argument-Bit-Len: %u\n",
+ locator->argument_bits_length);
+
+ if (CHECK_FLAG(locator->flags, SRV6_LOCATOR_USID))
+ vty_out(vty, "Behavior: uSID\n");
+ }
vty_out(vty, "Chunks:\n");
for (ALL_LIST_ELEMENTS_RO((struct list *)locator->chunks, node,