From 617938c262d964eacb3ef2cffd41b4f9272034d7 Mon Sep 17 00:00:00 2001 From: Divakar Date: Wed, 20 May 2015 21:14:51 -0700 Subject: [PATCH] Bum traffic handling in transparent service chain When the BUM traffic is received on transparent service chain interface, it has to be dropped to avoid the loops in that service chain network. Checking-in on behalf of Anand Change-Id: Ife3c6087f90d7b93130d69652d4177da66162d91 closes-bug: #1449166 --- dp-core/vr_datapath.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dp-core/vr_datapath.c b/dp-core/vr_datapath.c index 355f9b54d..03eaeff0e 100644 --- a/dp-core/vr_datapath.c +++ b/dp-core/vr_datapath.c @@ -495,6 +495,18 @@ vr_virtual_input(unsigned short vrf, struct vr_interface *vif, return 0; } + /* + * we really do not allow any broadcast packets from interfaces + * that are part of transparent service chain, since transparent + * service chain bridges packets across vrf (and hence loops can + * happen) + */ + if ((pkt->vp_flags & VP_FLAG_MULTICAST) && + (vif_is_service(vif))) { + vif_drop_pkt(vif, pkt, 1); + return 0; + } + if (!vr_flow_forward(pkt->vp_if->vif_router, pkt, &fmd)) return 0;