diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2024-06-18 17:40:08 +0200 | 
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2024-07-04 13:56:35 +0200 | 
| commit | 7f2a9114af2584c420f8c98072693b9ce2cad859 (patch) | |
| tree | d4232e93ecf8901f00534bf9a96ce7d13fc2197e /sharpd | |
| parent | d4758b3ccc76c77d0b8ba255089f79e67379bb30 (diff) | |
sharpd: fix set ZAPI_MESSAGE_NEXTHOP in nhg only when nexthops used
The ZAPI_MESSAGE_NEXTHOP flag is systematically set, even if the
route message does not include any nexthops. Limit the usage of this
value only when nexthops are present.
Fixes: 8a71d93d85a6 ("sharpd: Add Super Happy Advanced Routing Protocol")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'sharpd')
| -rw-r--r-- | sharpd/sharp_zebra.c | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c index 133da918fa..1048436b43 100644 --- a/sharpd/sharp_zebra.c +++ b/sharpd/sharp_zebra.c @@ -247,12 +247,12 @@ static bool route_add(const struct prefix *p, vrf_id_t vrf_id, uint8_t instance,  	memcpy(&api.prefix, p, sizeof(*p));  	api.flags = flags; -	SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);  	/* Only send via ID if nhgroup has been successfully installed */  	if (nhgid && sharp_nhgroup_id_is_installed(nhgid)) {  		zapi_route_set_nhg_id(&api, &nhgid);  	} else { +		SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);  		for (ALL_NEXTHOPS_PTR(nhg, nh)) {  			/* Check if we set a VNI label */  			if (nh->nh_label &&  | 
