diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2019-01-14 08:58:36 +0100 | 
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2019-02-19 21:11:13 +0100 | 
| commit | 4b23867cad558a59e8d315400b82c0453510c9af (patch) | |
| tree | 659eb4c089bfca4451921697caad11eaa5bc2d18 /eigrpd | |
| parent | 8faeb50fe40976313a309a0e1870e29bebd99fd6 (diff) | |
lib, rip, ripng, eigrp: rework if_rmap context
so as to handle ri/ripng/eigrp multiple instances, the need is to
encapsulate if_rmap hash table into a container context self to each
instance. This work then reviews the if_rmap api, mainly by adding a
if_rmap_ctx context, that is passed for each exchange between library
and the daemon.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'eigrpd')
| -rw-r--r-- | eigrpd/eigrp_main.c | 5 | ||||
| -rw-r--r-- | eigrpd/eigrpd.c | 7 | 
2 files changed, 8 insertions, 4 deletions
diff --git a/eigrpd/eigrp_main.c b/eigrpd/eigrp_main.c index b19b383e65..3db59a838b 100644 --- a/eigrpd/eigrp_main.c +++ b/eigrpd/eigrp_main.c @@ -211,10 +211,7 @@ int main(int argc, char **argv, char **envp)  	/*eigrp_route_map_init();  	  route_map_add_hook (eigrp_rmap_update);  	  route_map_delete_hook (eigrp_rmap_update);*/ -	/*if_rmap_init (EIGRP_NODE); -	  if_rmap_hook_add (eigrp_if_rmap_update); -	  if_rmap_hook_delete (eigrp_if_rmap_update);*/ - +	/*if_rmap_init (EIGRP_NODE); */  	/* Distribute list install. */  	distribute_list_init(EIGRP_NODE); diff --git a/eigrpd/eigrpd.c b/eigrpd/eigrpd.c index 69d947e59f..4f0a5d1b0f 100644 --- a/eigrpd/eigrpd.c +++ b/eigrpd/eigrpd.c @@ -206,6 +206,13 @@ static struct eigrp *eigrp_new(const char *AS)  				 eigrp_distribute_update);  	distribute_list_delete_hook(eigrp->distribute_ctx,  				    eigrp_distribute_update); + +	/* +	  eigrp->if_rmap_ctx = if_rmap_ctx_create( +	                               vrf_lookup_by_id(VRF_DEFAULT)); +	  if_rmap_hook_add (eigrp_if_rmap_update); +	  if_rmap_hook_delete (eigrp_if_rmap_update); +	*/  	QOBJ_REG(eigrp, eigrp);  	return eigrp;  }  | 
