X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Freplication.c;h=5a8a0fe63b10309a0240573ddd52d0a4c38b36fc;hb=23f0c4515f62b18ef6f1ff7cab537838f0f65457;hp=0fdca0bf13c25091eededf3922e3dac21fdd962c;hpb=072401e8096c648b91f958bd911f64ce24fecff9;p=vpp.git diff --git a/src/vnet/replication.c b/src/vnet/replication.c index 0fdca0bf13c..5a8a0fe63b1 100644 --- a/src/vnet/replication.c +++ b/src/vnet/replication.c @@ -45,6 +45,7 @@ replication_prep (vlib_main_t * vm, /* Save state from vlib buffer */ ctx->saved_free_list_index = vlib_buffer_get_free_list_index (b0); ctx->current_data = b0->current_data; + ctx->flags = b0->flags & VNET_BUFFER_FLAGS_VLAN_BITS; /* Set up vlib buffer hooks */ b0->recycle_count = ctx_id; @@ -104,6 +105,10 @@ replication_recycle (vlib_main_t * vm, vlib_buffer_t * b0, u32 is_last) clib_memcpy (vnet_buffer (b0), ctx->vnet_buffer, sizeof (vnet_buffer_opaque_t)); + /* Restore the vlan flags */ + b0->flags &= ~VNET_BUFFER_FLAGS_VLAN_BITS; + b0->flags |= ctx->flags; + /* Restore the packet start (current_data) and length */ vlib_buffer_advance (b0, ctx->current_data - b0->current_data);