Skip to content

Commit

Permalink
Do not do a 'preset' on mirror packets
Browse files Browse the repository at this point in the history
When a packet comes from vhost, we typically accept the layer 2
header that is supplied by the host and hence a 'preset' is done
to reset the packet to what it was before it entered vRouter.
Unfortunately, this was also done for packets those mirrored such
packets, leading to offset issues since we do end up adding a lot
more headers than what the original packets contain. This leads to
wrong length calculation and hence searching for more skbs than
that is originally present and a crash.

Change-Id: I906e7e3417c84ad567cf4b822187929b2a609b68
Closes-BUG: #1543534
  • Loading branch information
anandhk-juniper committed Feb 11, 2016
1 parent 426c31c commit 0c8185a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dp-core/vr_interface.c
Expand Up @@ -984,7 +984,8 @@ eth_set_rewrite(struct vr_interface *vif, struct vr_packet *pkt,
if (!len)
return pkt_data(pkt);

if (pkt->vp_if->vif_type == VIF_TYPE_HOST) {
if ((pkt->vp_if->vif_type == VIF_TYPE_HOST) &&
!(pkt->vp_flags & VP_FLAG_FROM_DP)) {
vr_preset(pkt);
return pkt_data(pkt);
}
Expand Down

0 comments on commit 0c8185a

Please sign in to comment.