summaryrefslogtreecommitdiffstats
path: root/vpp-api-test
diff options
context:
space:
mode:
authorPavel Kotucek <pkotucek@cisco.com>2016-12-02 08:18:55 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2016-12-02 11:53:25 +0000
commit9dd34e00ede6e5d0b32e8e0c0b26b03dee468549 (patch)
treebd3137c0d81d606e3563e6c9972a21f76915020f /vpp-api-test
parent21da6ce02535cc4b0a5adf637af7c5b085ce5e67 (diff)
api: fix inconsistent behaviour when adding l2fib filter entry (VPP-147)
Inconsistency when adding L2 fib entry using CLI and API (doesn't work) Change-Id: I6b58d8a4c444d2712d1a4c225cea5eb5189c355f Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
Diffstat (limited to 'vpp-api-test')
-rw-r--r--vpp-api-test/vat/api_format.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vpp-api-test/vat/api_format.c b/vpp-api-test/vat/api_format.c
index bc4a6fa3f3a..9d80c42aba2 100644
--- a/vpp-api-test/vat/api_format.c
+++ b/vpp-api-test/vat/api_format.c
@@ -5297,7 +5297,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;
+ u32 sw_if_index = ~0;
u8 sw_if_index_set = 0;
u8 is_add = 1;
u8 static_mac = 0;
@@ -5358,7 +5358,7 @@ api_l2fib_add_del (vat_main_t * vam)
return -99;
}
- if (is_add && (sw_if_index_set == 0))
+ if (is_add && sw_if_index_set == 0 && filter_mac == 0)
{
errmsg ("missing interface name or sw_if_index\n");
return -99;