From: Vratko Polak Date: Fri, 20 Sep 2019 16:23:58 +0000 (+0200) Subject: lb: vl_api_lb_conf_t_handler has to ntohl X-Git-Tag: v20.05-rc0~791 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=6eb009ac023799e4ee1b75d759d726622c39de78;p=vpp.git 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 --- 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); }