diff options
| author | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-02-02 13:04:33 +0100 | 
|---|---|---|
| committer | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-09-11 17:34:53 +0200 | 
| commit | bef41422b4c529bdab52a9c7439c88bab6368744 (patch) | |
| tree | 4cf32c473fb1f1862ee284cfc676595da242f4c4 | |
| parent | b822dc4beea74ac6a8cc9ad4d64e41851d3b7e9f (diff) | |
isisd: Add func to release an SRv6 locator chunk
Add a function to ask zebra to release a chunk from the SRv6 locator
specified as a parameter.
The chunk to be released must have been allocated by a previous call to
`isis_zebra_srv6_manager_get_locator_chunk()`.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
| -rw-r--r-- | isisd/isis_zebra.c | 13 | ||||
| -rw-r--r-- | isisd/isis_zebra.h | 1 | 
2 files changed, 14 insertions, 0 deletions
diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c index e2c6a5eadc..4c404ddb08 100644 --- a/isisd/isis_zebra.c +++ b/isisd/isis_zebra.c @@ -832,6 +832,19 @@ int isis_zebra_srv6_manager_get_locator_chunk(const char *name)  	return srv6_manager_get_locator_chunk(zclient, name);  } + +/** + * Release an SRv6 locator chunk. + * + * @param locator_name Name of SRv6 locator + * + * @result 0 on success, -1 otherwise + */ +int isis_zebra_srv6_manager_release_locator_chunk(const char *name) +{ +	return srv6_manager_release_locator_chunk(zclient, name); +} +  static zclient_handler *const isis_handlers[] = {  	[ZEBRA_ROUTER_ID_UPDATE] = isis_router_id_update_zebra,  	[ZEBRA_INTERFACE_ADDRESS_ADD] = isis_zebra_if_address_add, diff --git a/isisd/isis_zebra.h b/isisd/isis_zebra.h index c32093f957..94a4666697 100644 --- a/isisd/isis_zebra.h +++ b/isisd/isis_zebra.h @@ -58,5 +58,6 @@ void isis_zebra_vrf_deregister(struct isis *isis);  int isis_zebra_ls_register(bool up);  extern int isis_zebra_srv6_manager_get_locator_chunk(const char *name); +extern int isis_zebra_srv6_manager_release_locator_chunk(const char *name);  #endif /* _ZEBRA_ISIS_ZEBRA_H */  | 
