aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2018-05-31 10:25:18 -0400
committerFlorin Coras <florin.coras@gmail.com>2018-05-31 23:30:19 +0000
commit7dbd7265daf6fa0f522870586036c89a99bc4958 (patch)
treecba4a7ed53b36b3640e0942d10c88fc238d56e07 /src/vat
parenta059a000f81a7251ffed2821f69dd96cfd94c8c7 (diff)
Improve L2FIB delete entry handling and "show l2fib" CLI options
Improve deletion of L2FIB MAC entry using l2fib_add_del API. If sw_if_index param specified in th API is non-zero, check that its value match that of the MAC entry to proceed with deletion. Improve "show l2fib" CLI to allow display of all entries, learned entries only, or added ovia CLI/API entries only. For added entry, show "no" under the age column to indicate entry does not age. Change-Id: I0bd2582c2b6bac268e551e4f8ca6dab2be4400ad Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'src/vat')
-rw-r--r--src/vat/api_format.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index ca9ebec698e..dfb0284955e 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -7354,7 +7354,7 @@ api_l2fib_add_del (vat_main_t * vam)
u8 mac_set = 0;
u32 bd_id;
u8 bd_id_set = 0;
- u32 sw_if_index = ~0;
+ u32 sw_if_index = 0;
u8 sw_if_index_set = 0;
u8 is_add = 1;
u8 static_mac = 0;
@@ -7437,10 +7437,10 @@ api_l2fib_add_del (vat_main_t * vam)
clib_memcpy (mp->mac, mac, 6);
mp->bd_id = ntohl (bd_id);
mp->is_add = is_add;
+ mp->sw_if_index = ntohl (sw_if_index);
if (is_add)
{
- mp->sw_if_index = ntohl (sw_if_index);
mp->static_mac = static_mac;
mp->filter_mac = filter_mac;
mp->bvi_mac = bvi_mac;