From patchwork Thu Feb 2 22:33:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1736668 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RkB9cI/C; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P7D976DWbz23gY for ; Fri, 3 Feb 2023 09:34:03 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 3335981F48; Thu, 2 Feb 2023 22:34:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3335981F48 Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RkB9cI/C X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f0tGA7VnZOcK; Thu, 2 Feb 2023 22:34:00 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 59FE381EE2; Thu, 2 Feb 2023 22:33:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 59FE381EE2 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 080EEC0032; Thu, 2 Feb 2023 22:33:59 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id E8048C002B for ; Thu, 2 Feb 2023 22:33:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id AECB081EF8 for ; Thu, 2 Feb 2023 22:33:57 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org AECB081EF8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1TPJ_y_G6AEt for ; Thu, 2 Feb 2023 22:33:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3DBD081EE2 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 3DBD081EE2 for ; Thu, 2 Feb 2023 22:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675377234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NN02+bHlB/r1+KUtlP2MNpj85yzuS/kPnQGkT/NDaOA=; b=RkB9cI/CSef9YwxzcS9l/lvzLJ3WKyjA3MjrdqIzArMtMwWz1clahyV1zId4sXlBCG8ZFR uPLbtel6bVfRqIyQwsaApMhRFTPk1Cyj4M/ulDOXX3Vd27yA8XcXltX6eMuLFTLAq0vKVr kIewzYSyzMEew/X6K/U5dOQhTvAtEsU= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-216-VDKGSGOuPpCZGB_IC9Cl5A-1; Thu, 02 Feb 2023 17:33:54 -0500 X-MC-Unique: VDKGSGOuPpCZGB_IC9Cl5A-1 Received: by mail-wm1-f70.google.com with SMTP id h18-20020a05600c351200b003dc25fc1849so1734442wmq.6 for ; Thu, 02 Feb 2023 14:33:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NN02+bHlB/r1+KUtlP2MNpj85yzuS/kPnQGkT/NDaOA=; b=B9SITdeDT4R+DJM8Adx/72Hw8CMStNqTgebtj9KuNaDYhAJt+WQ0+BQQjKm+u5uPip G/lF8g079FNV2pH00zWVim+FYhBW5UVjjX+qGzgLCUoceL5BBCihF7McDvxSmnpXHmn2 vRPgCeGgtQM4A5TqqXD79ooE7Qs6jXJjLsOdWALuzN5tH2c7wUxsW6r/y6NOQOCcFQhJ 2uEBqR5DiKCYDe7UriX/TqiDIKp/bW6tQgqgMWa2btcPHPg8JVi3tPiEEYHMAQqKBPfP kDJv9tz04s4F8EXA5hKhpQkZiFGT/3ydckmYijpYPt3KBHMmev6NZ7VNqAQ1AZE8jReY HGOA== X-Gm-Message-State: AO0yUKX/3tAEXCzqLSkRriv3nxjyZ3SpO8BDphGJziFjpbzr80aueaIi DD+/bTmQ4FKYbIxubVvRrS54P6K3ZAwoPJCccoUE9GdvXk/4fw1Msm6fP6xrKHzBBf6nhGnlv4W wc9LYoGcLrxf7GeETZBKp2r/FphxsDpdtqmBLzoP2mP9Nn/w+utj2FsQj8d0QEYvgSy3Z5oXSgj wO58MN X-Received: by 2002:a05:600c:1e19:b0:3dc:52fc:7f06 with SMTP id ay25-20020a05600c1e1900b003dc52fc7f06mr7120954wmb.41.1675377231560; Thu, 02 Feb 2023 14:33:51 -0800 (PST) X-Google-Smtp-Source: AK7set8trZuRnOQxP6QjHvNpxTtpRbZZvCyPJ2J0HQP4XaRi+xH4+169E8MLfseFqyawOkaMZWfFCg== X-Received: by 2002:a05:600c:1e19:b0:3dc:52fc:7f06 with SMTP id ay25-20020a05600c1e1900b003dc52fc7f06mr7120943wmb.41.1675377231199; Thu, 02 Feb 2023 14:33:51 -0800 (PST) Received: from localhost (net-188-216-77-84.cust.vodafonedsl.it. [188.216.77.84]) by smtp.gmail.com with ESMTPSA id v9-20020adfa1c9000000b002bdbead763csm489677wrv.95.2023.02.02.14.33.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 14:33:50 -0800 (PST) From: Lorenzo Bianconi To: ovs-dev@openvswitch.org Date: Thu, 2 Feb 2023 23:33:47 +0100 Message-Id: <573ee5b675db3341c5b7b15ad9a7ebc07d9365bf.1675374669.git.lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: dceara@redhat.com Subject: [ovs-dev] [PATCH v3 ovn] northd: do not create flows for reserved multicast IPv6 groups X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Avoid creating logical flows for Link-Local reserved multicast addresses if advertised in a MLD reports since this interferes with Slaac IPv6 address resolution implemented in OVN. Acked-by: Acked-by: Dumitru Ceara Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2154930 Signed-off-by: Lorenzo Bianconi Reviewed-by: Ales Musil --- Changes since v2: - cosmetics --- lib/ovn-util.h | 17 +++++++++++++++++ northd/northd.c | 6 ++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/ovn-util.h b/lib/ovn-util.h index cd19919cb..656be823d 100644 --- a/lib/ovn-util.h +++ b/lib/ovn-util.h @@ -70,6 +70,23 @@ struct lport_addresses { struct ipv6_netaddr *ipv6_addrs; }; +static inline bool +ipv6_is_all_router(const struct in6_addr *addr) +{ + return ipv6_addr_equals(addr, &in6addr_all_routers); +} + +static const struct in6_addr in6addr_all_site_routers = {{{ + 0xff,0x05,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02 +}}}; + +static inline bool +ipv6_is_all_site_router(const struct in6_addr *addr) +{ + return ipv6_addr_equals(addr, &in6addr_all_site_routers); +} + bool is_dynamic_lsp_address(const char *address); bool extract_addresses(const char *address, struct lport_addresses *, int *ofs); diff --git a/northd/northd.c b/northd/northd.c index 2d82eccfe..ce0d57b65 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -9020,9 +9020,11 @@ build_lswitch_ip_mcast_igmp_mld(struct ovn_igmp_group *igmp_group, igmp_group->mcgroup.name); } else { /* RFC 4291, section 2.7.1: Skip groups that correspond to all - * hosts. + * hosts, all link-local routers and all site routers. */ - if (ipv6_is_all_hosts(&igmp_group->address)) { + if (ipv6_is_all_hosts(&igmp_group->address) || + ipv6_is_all_router(&igmp_group->address) || + ipv6_is_all_site_router(&igmp_group->address)) { return; } if (atomic_compare_exchange_strong(