aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2020-01-07 16:35:29 -0500
committerFlorin Coras <florin.coras@gmail.com>2020-01-08 15:17:39 +0000
commitb2e73b1dcb8e9eb3bf74a96fff20a9b27f7e6d73 (patch)
tree0b04d1ecd1be22d22dc7edd6b016e430e7d2b1ee /src/vnet/l2
parent120505928456d1760f99193be18ed369fc24d86f (diff)
l2: fix MAC learn counter update on adding MAC entry
Type: fix Signed-off-by: John Lo <loj@cisco.com> Change-Id: I711432f589ee4a4527cf795526d3b4031999f71d
Diffstat (limited to 'src/vnet/l2')
-rw-r--r--src/vnet/l2/l2_fib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/l2/l2_fib.c b/src/vnet/l2/l2_fib.c
index 3e71f771dfe..57325afa496 100644
--- a/src/vnet/l2/l2_fib.c
+++ b/src/vnet/l2/l2_fib.c
@@ -414,6 +414,7 @@ l2fib_add_entry (const u8 * mac, u32 bd_index,
/* set up key */
key.raw = l2fib_make_key (mac, bd_index);
+ kv.key = key.raw;
/* check if entry already exist */
if (BV (clib_bihash_search) (&fm->mac_table, &kv, &kv))
@@ -433,7 +434,6 @@ l2fib_add_entry (const u8 * mac, u32 bd_index,
/* no aging for provisioned entry */
l2fib_entry_result_set_AGE_NOT (&result);
- kv.key = key.raw;
kv.value = result.raw;
BV (clib_bihash_add_del) (&fm->mac_table, &kv, 1 /* is_add */ );