summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIJsbrand Wijnands <iwijnand@cisco.com>2019-10-28 17:19:27 +0100
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-11-18 13:16:21 +0000
commit511cef1b9e9cdae5ef535beffe7714ebd0333b3a (patch)
tree0ba54c55101344042e2296cecad80dd4e1a0b3aa
parent89ab1762d7a01bd009cbdd454604d2a15f99b6cd (diff)
mpls: number of mpls tunnel paths returns zero
The number of paths on the mpls tunnel returned through the bapi is always zero. Doing a ntohl on a uint32 and poking it into a uint8 causes the problem. Type: fix Signed-off-by: IJsbrand Wijnands <ice@cisco.com> Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: I4135ad43a891e7818ca673c8067ef1f11cb34530 (cherry picked from commit bf103d99e651f3b221361f6d964ae84870fd7a6b)
-rw-r--r--src/vnet/mpls/mpls_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/mpls/mpls_api.c b/src/vnet/mpls/mpls_api.c
index 530ceec31c4..56911c8791c 100644
--- a/src/vnet/mpls/mpls_api.c
+++ b/src/vnet/mpls/mpls_api.c
@@ -360,7 +360,7 @@ send_mpls_tunnel_entry (u32 mti, void *arg)
mp->_vl_msg_id = ntohs (VL_API_MPLS_TUNNEL_DETAILS);
mp->context = ctx->context;
- mp->mt_tunnel.mt_n_paths = ntohl (n);
+ mp->mt_tunnel.mt_n_paths = n;
mp->mt_tunnel.mt_sw_if_index = ntohl (mt->mt_sw_if_index);
mp->mt_tunnel.mt_tunnel_index = ntohl (mti);
mp->mt_tunnel.mt_l2_only = ! !(MPLS_TUNNEL_FLAG_L2 & mt->mt_flags);