diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-09-28 12:44:31 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-10-12 13:35:38 -0400 |
| commit | 2d6a0128dd94534541972be8e750914e45029153 (patch) | |
| tree | 6a5a4a8fe30f181c39f2b4b6056e73c111d1f06c /zebra/zapi_msg.c | |
| parent | 35718a2aeaeacdf2fec3eca50f614337219244ff (diff) | |
zebra: Make ucmp scale value owned by zrouter
The weight scale value might be useful to have it
change it's behavior at a later time or controlled
by something depending on how FRR is compiled/ran.
Let's start that process
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zapi_msg.c')
| -rw-r--r-- | zebra/zapi_msg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 2aeb1b97e9..92a81f6828 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -1730,7 +1730,8 @@ static bool zapi_read_nexthops(struct zserv *client, struct prefix *p, for (i = 0; i < nexthop_num; i++) { znh = &nhops[i]; - tmp = (uint64_t)znh->weight * 255; + tmp = (uint64_t)znh->weight * + zrouter.nexthop_weight_scale_value; znh->weight = MAX(1, ((uint32_t)(tmp / max_weight))); } } |
