From 163b8c0213c133f6ba43ce8ef2456ff3fdbf5fd2 Mon Sep 17 00:00:00 2001 From: Divakar Date: Fri, 31 Jul 2015 19:45:06 +0530 Subject: [PATCH] Flooding Garp packet from fabric interface In the allowed address pair scenario, to trap the Garp packets from VM, the route is marked with T flag. But if the Gratuitous packet is from fabric interface the packet needs to be given to VM's rather getting trapped to Agent. Right now for all Garp packets, the route flag is considered and if T is set, it is trapped to agent. This is leading to Garp not getting flooded to VM's. As a fix, Garp packets from fabric are always flooded. Change-Id: I3731ae74df92c03edc0c95502d5984455992179c closes-bug: #1478662 --- dp-core/vr_proto_ip.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dp-core/vr_proto_ip.c b/dp-core/vr_proto_ip.c index e3b4b6b2b..515d7ecc4 100644 --- a/dp-core/vr_proto_ip.c +++ b/dp-core/vr_proto_ip.c @@ -981,6 +981,13 @@ vm_arp_request(struct vr_interface *vif, struct vr_packet *pkt, sarp = (struct vr_arp *)pkt_data(pkt); + /* + * Garp coming from other compute nodes can be just flooded without + * considering the route information + */ + if (vr_grat_arp(sarp) && vif_is_fabric(pkt->vp_if)) + return MR_FLOOD; + memset(&rt, 0, sizeof(rt)); rt.rtr_req.rtr_vrf_id = fmd->fmd_dvrf; rt.rtr_req.rtr_family = AF_INET; @@ -1006,6 +1013,7 @@ vm_arp_request(struct vr_interface *vif, struct vr_packet *pkt, rt.rtr_nh = NULL; } + *(uint32_t *)rt.rtr_req.rtr_prefix = (sarp->arp_dpa); vr_inet_route_lookup(fmd->fmd_dvrf, &rt);