diff --git a/zebra/zebra_srv6_vty.c b/zebra/zebra_srv6_vty.c index 45e9d1cb8141..b8fabbd77a61 100644 --- a/zebra/zebra_srv6_vty.c +++ b/zebra/zebra_srv6_vty.c @@ -1406,10 +1406,11 @@ static int zebra_sr_config(struct vty *vty) vty_out(vty, " locator %s\n", locator->name); vty_out(vty, " prefix %s/%u", str, locator->prefix.prefixlen); - if (locator->block_bits_length) + if (locator->block_bits_length != + locator->prefix.prefixlen - ZEBRA_SRV6_LOCATOR_NODE_LENGTH) vty_out(vty, " block-len %u", locator->block_bits_length); - if (locator->node_bits_length) + if (locator->node_bits_length != ZEBRA_SRV6_LOCATOR_NODE_LENGTH) vty_out(vty, " node-len %u", locator->node_bits_length);