From 56611ab4bc5826c60081445420f0f80494f3b4b2 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 547c35961..f73c7b64d 100644 --- a/dp-core/vr_datapath.c +++ b/dp-core/vr_datapath.c @@ -550,7 +550,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; @@ -562,8 +562,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); } /*