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 24, 2016
1 parent ae3fb7e commit eeaa761
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dp-core/vr_datapath.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,15 +563,16 @@ 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;
fmd.fmd_dvrf = vrf;

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

if (vr_pkt_type(pkt, 0, &fmd) < 0) {
Expand Down

0 comments on commit eeaa761

Please sign in to comment.