diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2023-07-03 18:01:52 +0200 | 
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2023-07-12 14:06:00 +0200 | 
| commit | 4aee03bfd5767a8eebbcf0a99cd55d82605ebda5 (patch) | |
| tree | 430ca1a1d13af5bd866bb940641633dc0c6243cc /isisd/isis_zebra.c | |
| parent | 2150647069903840ef76353a5085eb5afc96cfaf (diff) | |
isisd: add the 'redistribute table' internal support
The 'redistribute table' command does not create the internal
contexts with the appropriate table identifier.
Redistributed prefixes in IS-IS do not care about the
table identifier. Add a linked list of redistribution
contexts, and map the nb configuration to the linked list.
- A new 'table' attribute is added in the 'struct
isis_redist' context.
- The 'isis_redist_update_zebra_subscriptions()' function
is removed and is replaced by direct call to zebra API
for turning on/off redirection.
- The redistributed routes coming from zebra import the
'tableid' information.
- The fabricd redistribute running-config is reworked,
and the 'get_redist_settings()' function is removed.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'isisd/isis_zebra.c')
| -rw-r--r-- | isisd/isis_zebra.c | 16 | 
1 files changed, 9 insertions, 7 deletions
diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c index 95bd37812f..43e9865fce 100644 --- a/isisd/isis_zebra.c +++ b/isisd/isis_zebra.c @@ -498,10 +498,10 @@ static int isis_zebra_read(ZAPI_CALLBACK_ARGS)  	if (cmd == ZEBRA_REDISTRIBUTE_ROUTE_ADD)  		isis_redist_add(isis, api.type, &api.prefix, &api.src_prefix, -				api.distance, api.metric, api.tag); +				api.distance, api.metric, api.tag, api.instance);  	else -		isis_redist_delete(isis, api.type, &api.prefix, -				   &api.src_prefix); +		isis_redist_delete(isis, api.type, &api.prefix, &api.src_prefix, +				   api.instance);  	return 0;  } @@ -511,24 +511,26 @@ int isis_distribute_list_update(int routetype)  	return 0;  } -void isis_zebra_redistribute_set(afi_t afi, int type, vrf_id_t vrf_id) +void isis_zebra_redistribute_set(afi_t afi, int type, vrf_id_t vrf_id, +				 uint16_t tableid)  {  	if (type == DEFAULT_ROUTE)  		zclient_redistribute_default(ZEBRA_REDISTRIBUTE_DEFAULT_ADD,  					     zclient, afi, vrf_id);  	else  		zclient_redistribute(ZEBRA_REDISTRIBUTE_ADD, zclient, afi, type, -				     0, vrf_id); +				     tableid, vrf_id);  } -void isis_zebra_redistribute_unset(afi_t afi, int type, vrf_id_t vrf_id) +void isis_zebra_redistribute_unset(afi_t afi, int type, vrf_id_t vrf_id, +				   uint16_t tableid)  {  	if (type == DEFAULT_ROUTE)  		zclient_redistribute_default(ZEBRA_REDISTRIBUTE_DEFAULT_DELETE,  					     zclient, afi, vrf_id);  	else  		zclient_redistribute(ZEBRA_REDISTRIBUTE_DELETE, zclient, afi, -				     type, 0, vrf_id); +				     type, tableid, vrf_id);  }  /**  | 
