From f5fa5ae2b021f946fbb8ec56e692459cd34bc7fb Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Wed, 26 Sep 2018 05:07:25 -0700 Subject: MPLS tunnel dump: use sw_if_index not tunnel_index Change-Id: I6c0d5aec6ee96a0d40358f0e09a0901b22265063 Signed-off-by: Neale Ranns --- src/vat/api_format.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/vat') diff --git a/src/vat/api_format.c b/src/vat/api_format.c index d334bcce870..9a31f187bef 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -20424,23 +20424,20 @@ api_mpls_tunnel_dump (vat_main_t * vam) { vl_api_mpls_tunnel_dump_t *mp; vl_api_control_ping_t *mp_ping; - i32 index = -1; + u32 sw_if_index = ~0; int ret; /* Parse args required to build the message */ while (unformat_check_input (vam->input) != UNFORMAT_END_OF_INPUT) { - if (!unformat (vam->input, "tunnel_index %d", &index)) - { - index = -1; - break; - } + if (unformat (vam->input, "sw_if_index %d", &sw_if_index)) + ; } - print (vam->ofp, " tunnel_index %d", index); + print (vam->ofp, " sw_if_index %d", sw_if_index); M (MPLS_TUNNEL_DUMP, mp); - mp->tunnel_index = htonl (index); + mp->sw_if_index = htonl (sw_if_index); S (mp); /* Use a control ping for synchronization */ -- cgit 1.2.3-korg