Skip to content

Commit

Permalink
Merge "Mirroring the GARP packes rather trapping" into R2.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Nov 23, 2015
2 parents 50c488c + c2e31f8 commit a5e9411
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
9 changes: 7 additions & 2 deletions dp-core/vr_datapath.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,13 @@ vr_handle_arp_request(struct vr_arp *sarp, struct vr_packet *pkt,
vr_trap(pkt, fmd->fmd_dvrf, AGENT_TRAP_ARP, NULL);
break;

case MR_TRAP:
vr_trap(pkt, fmd->fmd_dvrf, AGENT_TRAP_ARP, NULL);
case MR_MIRROR:
pkt_c = vr_pclone(pkt);
if (pkt_c)
vr_trap(pkt_c, fmd->fmd_dvrf, AGENT_TRAP_ARP, NULL);

/* Flood the original packet*/
handled = false;
break;

case MR_DROP:
Expand Down
2 changes: 1 addition & 1 deletion dp-core/vr_proto_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ vm_arp_request(struct vr_interface *vif, struct vr_packet *pkt,

if (vr_grat_arp(sarp)) {
if (rt.rtr_req.rtr_label_flags & VR_RT_ARP_TRAP_FLAG)
return MR_TRAP;
return MR_MIRROR;
return MR_FLOOD;
}

Expand Down
8 changes: 6 additions & 2 deletions dp-core/vr_proto_ip6.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,12 @@ vr_neighbor_input(struct vr_packet *pkt, struct vr_forwarding_md *fmd)
vr_trap(pkt, fmd->fmd_dvrf, AGENT_TRAP_ARP, NULL);
break;

case MR_TRAP:
vr_trap(pkt, fmd->fmd_dvrf, AGENT_TRAP_ARP, NULL);
case MR_MIRROR:
pkt_c = vr_pclone(pkt);
if (pkt_c)
vr_trap(pkt_c, fmd->fmd_dvrf, AGENT_TRAP_ARP, NULL);

handled = false;
break;

case MR_DROP:
Expand Down
2 changes: 1 addition & 1 deletion include/vr_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ typedef enum {
MR_FLOOD,
MR_PROXY,
MR_NOT_ME,
MR_TRAP,
MR_MIRROR,
MR_TRAP_X,
MR_XCONNECT,
} mac_response_t;
Expand Down

0 comments on commit a5e9411

Please sign in to comment.