summaryrefslogtreecommitdiff
path: root/pimd/pim_nb_config.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2024-11-21 13:45:58 -0500
committerGitHub <noreply@github.com>2024-11-21 13:45:58 -0500
commit0af5c2a6eb7ade86fe6fefab00d77da1cefb7ed2 (patch)
tree63f7480f3397bbf841d02b39cbebb942de5adb91 /pimd/pim_nb_config.c
parent9af78e29865b4b7f32a23fdfd829a7d4e5ae6108 (diff)
parent0b0648f15c0ced171dc29961ea374f11dd6a66cc (diff)
Merge pull request #17469 from opensourcerouting/msdp-logs
pimd: MSDP logging improvements
Diffstat (limited to 'pimd/pim_nb_config.c')
-rw-r--r--pimd/pim_nb_config.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/pimd/pim_nb_config.c b/pimd/pim_nb_config.c
index 87338f37c0..659b110307 100644
--- a/pimd/pim_nb_config.c
+++ b/pimd/pim_nb_config.c
@@ -1064,10 +1064,70 @@ pim6_msdp_err(routing_control_plane_protocols_control_plane_protocol_pim_address
pim6_msdp_err(pim_msdp_peer_authentication_type_modify, nb_cb_modify_args);
pim6_msdp_err(pim_msdp_peer_authentication_key_modify, nb_cb_modify_args);
pim6_msdp_err(pim_msdp_peer_authentication_key_destroy, nb_cb_destroy_args);
+pim6_msdp_err(pim_msdp_log_neighbor_events_modify, nb_cb_modify_args);
+pim6_msdp_err(pim_msdp_log_sa_events_modify, nb_cb_modify_args);
#if PIM_IPV != 6
/*
* XPath:
+ * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-pim:pim/address-family/msdp/log-neighbor-events
+ */
+int pim_msdp_log_neighbor_events_modify(struct nb_cb_modify_args *args)
+{
+ struct pim_instance *pim;
+ struct vrf *vrf;
+
+ switch (args->event) {
+ case NB_EV_VALIDATE:
+ case NB_EV_PREPARE:
+ case NB_EV_ABORT:
+ /* NOTHING */
+ break;
+
+ case NB_EV_APPLY:
+ vrf = nb_running_get_entry(args->dnode, NULL, true);
+ pim = vrf->info;
+ if (yang_dnode_get_bool(args->dnode, NULL))
+ SET_FLAG(pim->log_flags, PIM_MSDP_LOG_NEIGHBOR_EVENTS);
+ else
+ UNSET_FLAG(pim->log_flags, PIM_MSDP_LOG_NEIGHBOR_EVENTS);
+ break;
+ }
+
+ return NB_OK;
+}
+
+/*
+ * XPath:
+ * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-pim:pim/address-family/msdp/log-sa-events
+ */
+int pim_msdp_log_sa_events_modify(struct nb_cb_modify_args *args)
+{
+ struct pim_instance *pim;
+ struct vrf *vrf;
+
+ switch (args->event) {
+ case NB_EV_VALIDATE:
+ case NB_EV_PREPARE:
+ case NB_EV_ABORT:
+ /* NOTHING */
+ break;
+
+ case NB_EV_APPLY:
+ vrf = nb_running_get_entry(args->dnode, NULL, true);
+ pim = vrf->info;
+ if (yang_dnode_get_bool(args->dnode, NULL))
+ SET_FLAG(pim->log_flags, PIM_MSDP_LOG_SA_EVENTS);
+ else
+ UNSET_FLAG(pim->log_flags, PIM_MSDP_LOG_SA_EVENTS);
+ break;
+ }
+
+ return NB_OK;
+}
+
+/*
+ * XPath:
* /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-pim:pim/address-family/msdp-mesh-groups
*/
int pim_msdp_mesh_group_create(struct nb_cb_create_args *args)