[ovs-dev] [PATCH] ofproto-dpif-xlate: Fix duplicate multicast packets
Simon Horman
simon.horman at netronome.com
Fri Nov 11 12:52:07 UTC 2016
Hi,
On Mon, Nov 07, 2016 at 12:25:57PM +0000, O'Reilly, Darragh wrote:
>
> When iterating the list of mrouters, skip any that are not on the same
> vlan as the multicast packet to be forwarded. This bug was causing
> duplicate packets when more than one mrouter was behind a trunk port.
>
> Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2016-November/042938.html
> Signed-off-by: Darragh O'Reilly <darragh.oreilly at hpe.com>
This change seems reasonable to me but I am wondering if it
is possible to add a corresponding test to the test suite to exercise it.
> ---
> ofproto/ofproto-dpif-xlate.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
> index f6391ed..4d10a54 100644
> --- a/ofproto/ofproto-dpif-xlate.c
> +++ b/ofproto/ofproto-dpif-xlate.c
> @@ -2172,11 +2172,14 @@ xlate_normal_mcast_send_mrouters(struct xlate_ctx *ctx,
> xcfg = ovsrcu_get(struct xlate_cfg *, &xcfgp);
> LIST_FOR_EACH(mrouter, mrouter_node, &ms->mrouter_lru) {
> mcast_xbundle = xbundle_lookup(xcfg, mrouter->port);
> - if (mcast_xbundle && mcast_xbundle != in_xbundle) {
> + if (mcast_xbundle && mcast_xbundle != in_xbundle
> + && mrouter->vlan == vlan) {
> xlate_report(ctx, "forwarding to mcast router port");
> output_normal(ctx, mcast_xbundle, vlan);
> } else if (!mcast_xbundle) {
> xlate_report(ctx, "mcast router port is unknown, dropping");
> + } else if (mrouter->vlan != vlan) {
> + xlate_report(ctx, "mcast router is on another vlan, dropping");
> } else {
> xlate_report(ctx, "mcast router port is input port, dropping");
> }
> --
> 2.7.4
More information about the dev
mailing list