summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pimd/pim_cmd.c57
-rw-r--r--pimd/pim_nb_config.c15
2 files changed, 51 insertions, 21 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index d945fe026..20d47cbe9 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -6848,9 +6848,10 @@ DEFUN (ip_pim_joinprune_time,
"Join Prune Send Interval\n"
"Seconds\n")
{
- PIM_DECLVAR_CONTEXT(vrf, pim);
- router->t_periodic = atoi(argv[3]->arg);
- return CMD_SUCCESS;
+ nb_cli_enqueue_change(vty, "/frr-pim:pim/join-prune-interval",
+ NB_OP_MODIFY, argv[3]->arg);
+
+ return nb_cli_apply_changes(vty, NULL);
}
DEFUN (no_ip_pim_joinprune_time,
@@ -6862,9 +6863,15 @@ DEFUN (no_ip_pim_joinprune_time,
"Join Prune Send Interval\n"
"Seconds\n")
{
- PIM_DECLVAR_CONTEXT(vrf, pim);
- router->t_periodic = PIM_DEFAULT_T_PERIODIC;
- return CMD_SUCCESS;
+ char jp_default_timer[5];
+
+ snprintf(jp_default_timer, sizeof(jp_default_timer), "%d",
+ PIM_DEFAULT_T_PERIODIC);
+
+ nb_cli_enqueue_change(vty, "/frr-pim:pim/join-prune-interval",
+ NB_OP_MODIFY, jp_default_timer);
+
+ return nb_cli_apply_changes(vty, NULL);
}
DEFUN (ip_pim_register_suppress,
@@ -6875,9 +6882,10 @@ DEFUN (ip_pim_register_suppress,
"Register Suppress Timer\n"
"Seconds\n")
{
- PIM_DECLVAR_CONTEXT(vrf, pim);
- router->register_suppress_time = atoi(argv[3]->arg);
- return CMD_SUCCESS;
+ nb_cli_enqueue_change(vty, "/frr-pim:pim/register-suppress-time",
+ NB_OP_MODIFY, argv[3]->arg);
+
+ return nb_cli_apply_changes(vty, NULL);
}
DEFUN (no_ip_pim_register_suppress,
@@ -6889,9 +6897,15 @@ DEFUN (no_ip_pim_register_suppress,
"Register Suppress Timer\n"
"Seconds\n")
{
- PIM_DECLVAR_CONTEXT(vrf, pim);
- router->register_suppress_time = PIM_REGISTER_SUPPRESSION_TIME_DEFAULT;
- return CMD_SUCCESS;
+ char rs_default_timer[5];
+
+ snprintf(rs_default_timer, sizeof(rs_default_timer), "%d",
+ PIM_REGISTER_SUPPRESSION_TIME_DEFAULT);
+
+ nb_cli_enqueue_change(vty, "/frr-pim:pim/register-suppress-time",
+ NB_OP_MODIFY, rs_default_timer);
+
+ return nb_cli_apply_changes(vty, NULL);
}
DEFUN (ip_pim_rp_keep_alive,
@@ -6958,9 +6972,10 @@ DEFUN (ip_pim_packets,
"packets to process at one time per fd\n"
"Number of packets\n")
{
- PIM_DECLVAR_CONTEXT(vrf, pim);
- router->packet_process = atoi(argv[3]->arg);
- return CMD_SUCCESS;
+ nb_cli_enqueue_change(vty, "/frr-pim:pim/packets", NB_OP_MODIFY,
+ argv[3]->arg);
+
+ return nb_cli_apply_changes(vty, NULL);
}
DEFUN (no_ip_pim_packets,
@@ -6972,9 +6987,15 @@ DEFUN (no_ip_pim_packets,
"packets to process at one time per fd\n"
"Number of packets\n")
{
- PIM_DECLVAR_CONTEXT(vrf, pim);
- router->packet_process = PIM_DEFAULT_PACKET_PROCESS;
- return CMD_SUCCESS;
+ char default_packet[3];
+
+ snprintf(default_packet, sizeof(default_packet), "%d",
+ PIM_DEFAULT_PACKET_PROCESS);
+
+ nb_cli_enqueue_change(vty, "/frr-pim:pim/packets", NB_OP_MODIFY,
+ default_packet);
+
+ return nb_cli_apply_changes(vty, NULL);
}
DEFPY (igmp_group_watermark,
diff --git a/pimd/pim_nb_config.c b/pimd/pim_nb_config.c
index 68111dc1e..4a41bf6e2 100644
--- a/pimd/pim_nb_config.c
+++ b/pimd/pim_nb_config.c
@@ -390,8 +390,10 @@ int pim_packets_modify(struct nb_cb_modify_args *args)
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
+ break;
case NB_EV_APPLY:
- /* TODO: implement me. */
+ router->packet_process = yang_dnode_get_uint8(args->dnode,
+ NULL);
break;
}
@@ -407,8 +409,9 @@ int pim_join_prune_interval_modify(struct nb_cb_modify_args *args)
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
+ break;
case NB_EV_APPLY:
- /* TODO: implement me. */
+ router->t_periodic = yang_dnode_get_uint16(args->dnode, NULL);
break;
}
@@ -420,12 +423,18 @@ int pim_join_prune_interval_modify(struct nb_cb_modify_args *args)
*/
int pim_register_suppress_time_modify(struct nb_cb_modify_args *args)
{
+ struct vrf *vrf;
+ struct pim_instance *pim;
+
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
+ break;
case NB_EV_APPLY:
- /* TODO: implement me. */
+ vrf = nb_running_get_entry(args->dnode, NULL, true);
+ pim = vrf->info;
+ pim->keep_alive_time = yang_dnode_get_uint16(args->dnode, NULL);
break;
}