diff options
| author | Sai Gomathi N <nsaigomathi@vmware.com> | 2022-01-18 07:16:51 -0800 |
|---|---|---|
| committer | Sai Gomathi N <nsaigomathi@vmware.com> | 2022-04-05 00:00:01 -0700 |
| commit | c8b3d45de274f6941638a342f2d502b377e2ee7e (patch) | |
| tree | c144807ed960179a942c20bac0c8ab9e1c68dda6 /pimd/pim_cmd_common.c | |
| parent | 4e35ece397fc5bcbd15aa0c5341f8447f206031b (diff) | |
pim6d: Adding "ipv6 mld query-max-response-time" CLI
Adding the Interface level config command
ipv6 mld query-max-response-time <1-65535>
This command can be use to tune the max response time for general queries.
The number of seconds represented by the [Query Response Interval] must be less than the [Query Interval]
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Diffstat (limited to 'pimd/pim_cmd_common.c')
| -rw-r--r-- | pimd/pim_cmd_common.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pimd/pim_cmd_common.c b/pimd/pim_cmd_common.c index 0d575a1456..087448ab16 100644 --- a/pimd/pim_cmd_common.c +++ b/pimd/pim_cmd_common.c @@ -2749,3 +2749,34 @@ void pim_show_neighbors(struct pim_instance *pim, struct vty *vty, } } } + +int gm_process_query_max_response_time_cmd(struct vty *vty, + const char *qmrt_str) +{ + const struct lyd_node *pim_enable_dnode; + + pim_enable_dnode = yang_dnode_getf(vty->candidate_config->dnode, + FRR_PIM_ENABLE_XPATH, VTY_CURR_XPATH, + FRR_PIM_AF_XPATH_VAL); + + if (!pim_enable_dnode) { + nb_cli_enqueue_change(vty, "./enable", NB_OP_MODIFY, "true"); + } else { + if (!yang_dnode_get_bool(pim_enable_dnode, ".")) + nb_cli_enqueue_change(vty, "./enable", NB_OP_MODIFY, + "true"); + } + + nb_cli_enqueue_change(vty, "./query-max-response-time", NB_OP_MODIFY, + qmrt_str); + return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH, + FRR_PIM_AF_XPATH_VAL); +} + +int gm_process_no_query_max_response_time_cmd(struct vty *vty) +{ + nb_cli_enqueue_change(vty, "./query-max-response-time", NB_OP_DESTROY, + NULL); + return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH, + FRR_PIM_AF_XPATH_VAL); +} |
