summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_api.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2017-10-27 21:28:07 +0200
committerJohn Lo <loj@cisco.com>2017-10-31 15:21:28 +0000
commit57938f63cc6743193c76d4fa89ad3250a5f76b56 (patch)
tree8588b7dc58dc96c8b8a3f1928985cd1870b96042 /src/vnet/l2/l2_api.c
parent756d5f76859cc6495dba16a583580d8e7d02a8e6 (diff)
l2fib: MAC: Fix uint64 to u8 byte array
As per proposal on the mailing list, this patch fixes the represntation of MAC address in VPP API calls for · L2fib_add_del · L2_fib_table_details Change-Id: I31e17efd1a6314cded69666e693cb8fc33158d02 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_api.c')
-rw-r--r--src/vnet/l2/l2_api.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/l2/l2_api.c b/src/vnet/l2/l2_api.c
index 20d6ab32fad..8fd94b0e40a 100644
--- a/src/vnet/l2/l2_api.c
+++ b/src/vnet/l2/l2_api.c
@@ -133,7 +133,7 @@ send_l2fib_table_entry (vpe_api_main_t * am,
mp->bd_id =
ntohl (l2input_main.bd_configs[l2fe_key->fields.bd_index].bd_id);
- mp->mac = l2fib_make_key (l2fe_key->fields.mac, 0);
+ clib_memcpy (mp->mac, l2fe_key->fields.mac, 6);
mp->sw_if_index = ntohl (l2fe_res->fields.sw_if_index);
mp->static_mac = l2fe_res->fields.static_mac;
mp->filter_mac = l2fe_res->fields.filter;
@@ -199,7 +199,9 @@ vl_api_l2fib_add_del_t_handler (vl_api_l2fib_add_del_t * mp)
}
u32 bd_index = p[0];
- u64 mac = mp->mac;
+ u8 mac[6];
+
+ clib_memcpy (mac, mp->mac, 6);
if (mp->is_add)
{
if (mp->filter_mac)