]> git.puffer.fish Git - mirror/frr.git/commitdiff
yang,pimd: support shutdown and SA limit
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 10 May 2022 11:23:24 +0000 (08:23 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Thu, 5 Dec 2024 13:35:10 +0000 (10:35 -0300)
Add MSDP shutdown and SA limiting configuration to YANG model.

(no implementation, just boiler plate code)

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
pimd/pim_nb.c
pimd/pim_nb.h
pimd/pim_nb_config.c
yang/frr-pim.yang

index 4a5ad87942b2e2b9f37875ca52d78d0c7a0c1331..f030995278f2eccd91cf45ae5bb6b1a5cfec711e 100644 (file)
@@ -208,6 +208,13 @@ const struct frr_yang_module_info frr_pim_info = {
                                .destroy = pim_msdp_peer_authentication_key_destroy,
                        }
                },
+               {
+                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-pim:pim/address-family/msdp-peer/sa-limit",
+                       .cbs = {
+                               .modify = pim_msdp_peer_sa_limit_modify,
+                               .destroy = pim_msdp_peer_sa_limit_destroy,
+                       }
+               },
                {
                        .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-pim:pim/address-family/mlag",
                        .cbs = {
index a9693c65d8e6f12915ec4f2a5301ce1e56369a8f..0c1ce6ab85d7637ce7c628e072dfe868d67eda8e 100644 (file)
@@ -76,6 +76,8 @@ int pim_msdp_peer_sa_filter_out_destroy(struct nb_cb_destroy_args *args);
 int pim_msdp_peer_authentication_type_modify(struct nb_cb_modify_args *args);
 int pim_msdp_peer_authentication_key_modify(struct nb_cb_modify_args *args);
 int pim_msdp_peer_authentication_key_destroy(struct nb_cb_destroy_args *args);
+int pim_msdp_peer_sa_limit_modify(struct nb_cb_modify_args *args);
+int pim_msdp_peer_sa_limit_destroy(struct nb_cb_destroy_args *args);
 int routing_control_plane_protocols_control_plane_protocol_pim_address_family_mlag_create(
        struct nb_cb_create_args *args);
 int routing_control_plane_protocols_control_plane_protocol_pim_address_family_mlag_destroy(
index 171614208f0993d86880cc5f1720e75d76ebb6cc..b563bf5a3006b91e93e9fe383b2f5676d125553d 100644 (file)
@@ -1579,6 +1579,48 @@ int pim_msdp_peer_sa_filter_out_destroy(struct nb_cb_destroy_args *args)
        return NB_OK;
 }
 
+/*
+ * XPath:
+ * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-pim:pim/address-family/msdp-peer/sa-limit
+ */
+int pim_msdp_peer_sa_limit_modify(struct nb_cb_modify_args *args)
+{
+       struct pim_msdp_peer *mp;
+
+       switch (args->event) {
+       case NB_EV_VALIDATE:
+       case NB_EV_PREPARE:
+       case NB_EV_ABORT:
+               /* NOTHING */
+               break;
+       case NB_EV_APPLY:
+               mp = nb_running_get_entry(args->dnode, NULL, true);
+               /* TODO: apply limitation. */
+               break;
+       }
+
+       return NB_OK;
+}
+
+int pim_msdp_peer_sa_limit_destroy(struct nb_cb_destroy_args *args)
+{
+       struct pim_msdp_peer *mp;
+
+       switch (args->event) {
+       case NB_EV_VALIDATE:
+       case NB_EV_PREPARE:
+       case NB_EV_ABORT:
+               /* NOTHING */
+               break;
+       case NB_EV_APPLY:
+               mp = nb_running_get_entry(args->dnode, NULL, true);
+               /* TODO: remove limitation. */
+               break;
+       }
+
+       return NB_OK;
+}
+
 /*
  * XPath: /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-pim:pim/address-family/mlag
  */
index 33602fd29e607e6bb50b13707a98bf94dd751135..3343ed84b7b15204dfefadad49866e45dbc9333f 100644 (file)
@@ -337,6 +337,12 @@ module frr-pim {
       }
 
       uses msdp-authentication;
+
+      leaf sa-limit {
+        type uint32;
+        description
+          "Peer SA maximum limit.";
+      }
     }
 
     container mlag {