From 6eb009ac023799e4ee1b75d759d726622c39de78 Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Fri, 20 Sep 2019 18:23:58 +0200 Subject: [PATCH] lb: vl_api_lb_conf_t_handler has to ntohl As requested in review, this is a minimal edit. Refactor comes as a separate Change. Type: fix Change-Id: Ie3bdfc3cfde4bfee56848217133ca5f6bbccaeef Signed-off-by: Vratko Polak --- src/plugins/lb/api.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/lb/api.c b/src/plugins/lb/api.c index 53541799f49..0543720e4e5 100644 --- a/src/plugins/lb/api.c +++ b/src/plugins/lb/api.c @@ -78,16 +78,16 @@ vl_api_lb_conf_t_handler int rv = 0; if (mp->sticky_buckets_per_core == ~0) { - mp->sticky_buckets_per_core = lbm->per_cpu_sticky_buckets; + mp->sticky_buckets_per_core = htonl(lbm->per_cpu_sticky_buckets); } if (mp->flow_timeout == ~0) { - mp->flow_timeout = lbm->flow_timeout; + mp->flow_timeout = htonl(lbm->flow_timeout); } rv = lb_conf((ip4_address_t *)&mp->ip4_src_address, (ip6_address_t *)&mp->ip6_src_address, - mp->sticky_buckets_per_core, - mp->flow_timeout); + ntohl(mp->sticky_buckets_per_core), + ntohl(mp->flow_timeout)); REPLY_MACRO (VL_API_LB_CONF_REPLY); } -- 2.16.6