diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-15 01:11:15 +0300 | 
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-16 17:25:49 +0300 | 
| commit | 6c380957494506d3ef62c2244265a91dff5611dc (patch) | |
| tree | 416e49eafa5272e7169a9ca91446c7f8df08d9f1 /zebra/zebra_nb_config.c | |
| parent | 4ba756ed9cf95ba278e940e6c959f1987112e87b (diff) | |
zebra: make ribs config false
Zebra routing tables are not controlled by the user and can not be
created/deleted manually. Current NB create/destroy callbacks are
incorrectly implemented because instead of creating/deleting the RIB
they are only checking for it's existence. YANG model should reflect
the real situation.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'zebra/zebra_nb_config.c')
| -rw-r--r-- | zebra/zebra_nb_config.c | 55 | 
1 files changed, 0 insertions, 55 deletions
diff --git a/zebra/zebra_nb_config.c b/zebra/zebra_nb_config.c index 01c2401c0d..ba9f96b7de 100644 --- a/zebra/zebra_nb_config.c +++ b/zebra/zebra_nb_config.c @@ -1140,61 +1140,6 @@ int lib_interface_zebra_bandwidth_destroy(struct nb_cb_destroy_args *args)  }  /* - * XPath: /frr-vrf:lib/vrf/frr-zebra:zebra/ribs/rib - */ -int lib_vrf_zebra_ribs_rib_create(struct nb_cb_create_args *args) -{ -	struct vrf *vrf; -	afi_t afi; -	safi_t safi; -	struct zebra_vrf *zvrf; -	struct zebra_router_table *zrt; -	uint32_t table_id; -	const char *afi_safi_name; - -	vrf = nb_running_get_entry(args->dnode, NULL, false); -	zvrf = vrf_info_lookup(vrf->vrf_id); -	table_id = yang_dnode_get_uint32(args->dnode, "./table-id"); -	if (!table_id) -		table_id = zvrf->table_id; - -	afi_safi_name = yang_dnode_get_string(args->dnode, "./afi-safi-name"); -	yang_afi_safi_identity2value(afi_safi_name, &afi, &safi); - -	zrt = zebra_router_find_zrt(zvrf, table_id, afi, safi); - -	switch (args->event) { -	case NB_EV_VALIDATE: -		if (!zrt) { -			snprintf(args->errmsg, args->errmsg_len, -				 "vrf %s table is not found.", vrf->name); -			return NB_ERR_VALIDATION; -		} -		break; -	case NB_EV_PREPARE: -	case NB_EV_ABORT: -		break; -	case NB_EV_APPLY: - -		nb_running_set_entry(args->dnode, zrt); - -		break; -	} - -	return NB_OK; -} - -int lib_vrf_zebra_ribs_rib_destroy(struct nb_cb_destroy_args *args) -{ -	if (args->event != NB_EV_APPLY) -		return NB_OK; - -	nb_running_unset_entry(args->dnode); - -	return NB_OK; -} - -/*   * XPath: /frr-vrf:lib/vrf/frr-zebra:zebra/l3vni-id   */  int lib_vrf_zebra_l3vni_id_modify(struct nb_cb_modify_args *args)  | 
