diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2023-12-12 21:04:49 +0100 | 
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2023-12-18 10:08:45 +0100 | 
| commit | d8477d4bb534e37121c08b358fd923c703540ae0 (patch) | |
| tree | 81867837d754387a3348f8602622b120ba3dba3b /bgpd/bgp_zebra.c | |
| parent | 237ebf8d4503c841df8b3615f99b0c780bacccbd (diff) | |
bgpd, lib: add zapi_route_set_nhg_id() support
There is no function that both sets the nhg id, and sets
the ZAPI_MESSAGE_NHG flag if the nhg id is valid.
Create a ZAPI API to do this, and apply the changes wherever
needed.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd/bgp_zebra.c')
| -rw-r--r-- | bgpd/bgp_zebra.c | 4 | 
1 files changed, 1 insertions, 3 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index a550b90e8e..69afc7ea97 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -1248,9 +1248,7 @@ static void bgp_zebra_announce_parse_nexthop(  	/* EVPN MAC-IP routes are installed with a L3 NHG id */  	if (nhg_id && bgp_evpn_path_es_use_nhg(bgp, info, nhg_id)) {  		mpinfo = NULL; -		api->nhgid = *nhg_id; -		if (*nhg_id) -			SET_FLAG(api->message, ZAPI_MESSAGE_NHG); +		zapi_route_set_nhg_id(api, nhg_id);  	} else {  		mpinfo = info;  	}  | 
