From a4a93081416697c3f47db63050f288e55292d4b3 Mon Sep 17 00:00:00 2001 From: "Anand H. Krishnan" Date: Wed, 2 Mar 2016 12:12:07 +0530 Subject: [PATCH] Do not reuse forwarding metadata post mirroring 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 --- dp-core/vr_datapath.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dp-core/vr_datapath.c b/dp-core/vr_datapath.c index cb3d23aa3..1772c4c93 100644 --- a/dp-core/vr_datapath.c +++ b/dp-core/vr_datapath.c @@ -563,7 +563,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; @@ -575,8 +575,9 @@ vr_virtual_input(unsigned short vrf, struct vr_interface *vif, } 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); } /*