Skip to content

Commit

Permalink
Do not reuse forwarding metadata post mirroring
Browse files Browse the repository at this point in the history
A mirror action needs its own forwarding metadata since the forwarding
parameeters that are used for mirroring will be different from those
that are used for packet forwarding. In this particular case, the vrf
to which the packets are mirrored are different from the vrf to which
packets need to be classified, and hence the packets were dropped in the
flow module with no source route as the drop reason.

Change-Id: I21930818a5cdec560818acb79f671ce29ac8bc85
Closes-BUG: #1552101
  • Loading branch information
anandhk-juniper committed Mar 2, 2016
1 parent e5e8b85 commit 356bc69
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dp-core/vr_datapath.c
Expand Up @@ -547,7 +547,7 @@ unsigned int
vr_virtual_input(unsigned short vrf, struct vr_interface *vif,
struct vr_packet *pkt, unsigned short vlan_id)
{
struct vr_forwarding_md fmd;
struct vr_forwarding_md fmd, mfmd;

vr_init_forwarding_md(&fmd);
fmd.fmd_vlan = vlan_id;
Expand All @@ -559,7 +559,8 @@ vr_virtual_input(unsigned short vrf, struct vr_interface *vif,
}

if (vif->vif_flags & VIF_FLAG_MIRROR_RX) {
fmd.fmd_dvrf = vif->vif_vrf;
mfmd = fmd;
mfmd.fmd_dvrf = vif->vif_vrf;
vr_mirror(vif->vif_router, vif->vif_mirror_id, pkt, &fmd);
}

Expand Down

0 comments on commit 356bc69

Please sign in to comment.