diff options
| author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2022-05-10 08:23:24 -0300 | 
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2024-12-05 10:35:10 -0300 | 
| commit | c8ded86e9ef9aa4182f2b6f86a1467532e06f29e (patch) | |
| tree | b493f59dd8ff73c9041b9a2a03e15ca8b2deb3aa | |
| parent | 34485ee5368af6825ca0f0c886b6ca064d32580d (diff) | |
yang,pimd: support shutdown and SA limit
Add MSDP shutdown and SA limiting configuration to YANG model.
(no implementation, just boiler plate code)
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
| -rw-r--r-- | pimd/pim_nb.c | 7 | ||||
| -rw-r--r-- | pimd/pim_nb.h | 2 | ||||
| -rw-r--r-- | pimd/pim_nb_config.c | 42 | ||||
| -rw-r--r-- | yang/frr-pim.yang | 6 | 
4 files changed, 57 insertions, 0 deletions
diff --git a/pimd/pim_nb.c b/pimd/pim_nb.c index 4a5ad87942..f030995278 100644 --- a/pimd/pim_nb.c +++ b/pimd/pim_nb.c @@ -209,6 +209,13 @@ const struct frr_yang_module_info frr_pim_info = {  			}  		},  		{ +			.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 = {  				.create = routing_control_plane_protocols_control_plane_protocol_pim_address_family_mlag_create, diff --git a/pimd/pim_nb.h b/pimd/pim_nb.h index a9693c65d8..0c1ce6ab85 100644 --- a/pimd/pim_nb.h +++ b/pimd/pim_nb.h @@ -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( diff --git a/pimd/pim_nb_config.c b/pimd/pim_nb_config.c index 171614208f..b563bf5a30 100644 --- a/pimd/pim_nb_config.c +++ b/pimd/pim_nb_config.c @@ -1580,6 +1580,48 @@ int pim_msdp_peer_sa_filter_out_destroy(struct nb_cb_destroy_args *args)  }  /* + * 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   */  int routing_control_plane_protocols_control_plane_protocol_pim_address_family_mlag_create( diff --git a/yang/frr-pim.yang b/yang/frr-pim.yang index 33602fd29e..3343ed84b7 100644 --- a/yang/frr-pim.yang +++ b/yang/frr-pim.yang @@ -337,6 +337,12 @@ module frr-pim {        }        uses msdp-authentication; + +      leaf sa-limit { +        type uint32; +        description +          "Peer SA maximum limit."; +      }      }      container mlag {  | 
