summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_learn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/l2/l2_learn.c')
-rw-r--r--src/vnet/l2/l2_learn.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/vnet/l2/l2_learn.c b/src/vnet/l2/l2_learn.c
index adc5e70f493..3ff2e704a6e 100644
--- a/src/vnet/l2/l2_learn.c
+++ b/src/vnet/l2/l2_learn.c
@@ -138,11 +138,14 @@ l2learn_process (vlib_node_runtime_t * node,
* The entry was in the table, and the sw_if_index matched, the normal case
*/
counter_base[L2LEARN_ERROR_HIT] += 1;
- if (PREDICT_FALSE (result0->fields.timestamp != timestamp))
- result0->fields.timestamp = timestamp;
- if (PREDICT_FALSE
- (result0->fields.sn.as_u16 != vnet_buffer (b0)->l2.l2fib_sn))
- result0->fields.sn.as_u16 = vnet_buffer (b0)->l2.l2fib_sn;
+ if (!result0->fields.static_mac)
+ {
+ if (PREDICT_FALSE (result0->fields.timestamp != timestamp))
+ result0->fields.timestamp = timestamp;
+ if (PREDICT_FALSE
+ (result0->fields.sn.as_u16 != vnet_buffer (b0)->l2.l2fib_sn))
+ result0->fields.sn.as_u16 = vnet_buffer (b0)->l2.l2fib_sn;
+ }
}
else if (result0->raw == ~0)
{