From patchwork Fri Jan 27 17:50:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1732986 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.136; helo=smtp3.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=NBU/fXwt; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 4P3Q8g3J1lz23hm for ; Sat, 28 Jan 2023 04:50:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id D56BB61300; Fri, 27 Jan 2023 17:50:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D56BB61300 Authentication-Results: smtp3.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=NBU/fXwt X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3BPOLc13PO0A; Fri, 27 Jan 2023 17:50:24 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id DAA40612F5; Fri, 27 Jan 2023 17:50:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org DAA40612F5 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B3364C0033; Fri, 27 Jan 2023 17:50:22 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id EBE8AC002D for ; Fri, 27 Jan 2023 17:50:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C68418271A for ; Fri, 27 Jan 2023 17:50:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org C68418271A Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NBU/fXwt 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 SBD4fVHKbOAK for ; Fri, 27 Jan 2023 17:50:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 66760826BF Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 66760826BF for ; Fri, 27 Jan 2023 17:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674841818; 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=m8k3bc7seeDc+ossgMymJu0km4sK+X5Tg+Odc1stss0=; b=NBU/fXwtMYfeOhrGyGsxG9q/WSq3pwAQjTTvfSbfJP/cSXlafeKXgCj2NsgtdIpEJCJN8i 2f8dwG9eTeUeeCYUEWAfbC/FQivy/UC9mWB58di75VBP1Nq2krlWWAUSXNNfgpjC+RSHY2 1aqBlgUO/PqSkwixhZPxfKp11DfRhLI= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-509-OvIMjXSsPkOArRdAWnwtrQ-1; Fri, 27 Jan 2023 12:50:17 -0500 X-MC-Unique: OvIMjXSsPkOArRdAWnwtrQ-1 Received: by mail-wm1-f69.google.com with SMTP id r15-20020a05600c35cf00b003d9a14517b2so5056858wmq.2 for ; Fri, 27 Jan 2023 09:50:17 -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=m8k3bc7seeDc+ossgMymJu0km4sK+X5Tg+Odc1stss0=; b=HBBfJuBM/uqqePB+VR5T2gxRkMR1U0Esh7Be8jukHwhgQeWOWOKLS9pBo7XhlWRx1H 6PgplECE/+8RMwdQUA0qDx6g1CSfwY/IwWpEpHLvzauU3I/nGhuy8fxYwmO5He6Y6qO8 Y5nSvn6MZVpMWtll12QEv8bgqo5MjtKwq+8MjfJ9m3WpWvw+ZBAGCZ4x8UhifgrpgGS4 qHfuU/2x17lDOj/ubxBIKDSIjEvAZdVUHJj5KnxrGqPTlPdoRrKNvYEfEv7wT3Z5aHjZ X+EQaZOpJRP7GU6wjW5fV9X0ETKfYV0lTu7+DmIyc4YIv0HR7ApbvXct/3W5FaYBSBnA 29fw== X-Gm-Message-State: AO0yUKWSGW4o6zt6qwFIoHYzlP1KfS652QaUSp4ZQP1qa4YcUKJHKRZI iFG+pb4wORCtVJsaKYIEY+Kpt12gN0PC6SPKCbx6OFSIY7TNkVHe+YkuHZy2Nyyb41FTqQikHcC U4BkVMF058gyH0M04/Yh/kz9zkGFm4k9hUAeeOZX2wqdyovcs44iH/tfQkMKeVwpMSf9INK9W08 fmCu5k X-Received: by 2002:adf:e4c2:0:b0:2bf:b5ec:4842 with SMTP id v2-20020adfe4c2000000b002bfb5ec4842mr10528208wrm.45.1674841815808; Fri, 27 Jan 2023 09:50:15 -0800 (PST) X-Google-Smtp-Source: AK7set/8+BMv+FanA04unuvphWju9ffjvpdUYOUumhpEHO5ZC0FCT+856wLsM3hJJeSQvb65xvXD0Q== X-Received: by 2002:adf:e4c2:0:b0:2bf:b5ec:4842 with SMTP id v2-20020adfe4c2000000b002bfb5ec4842mr10528196wrm.45.1674841815592; Fri, 27 Jan 2023 09:50:15 -0800 (PST) Received: from localhost (net-188-216-77-84.cust.vodafonedsl.it. [188.216.77.84]) by smtp.gmail.com with ESMTPSA id g2-20020a5d4882000000b002bdf3809f59sm4421293wrq.38.2023.01.27.09.50.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 09:50:13 -0800 (PST) From: Lorenzo Bianconi To: ovs-dev@openvswitch.org Date: Fri, 27 Jan 2023 18:50:07 +0100 Message-Id: <14a9b54908070dd8641000a7e223efef90b49efa.1674841636.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 v2 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. Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2154930 Signed-off-by: Lorenzo Bianconi Acked-by: Dumitru Ceara --- lib/ovn-util.h | 13 +++++++++++++ northd/northd.c | 6 ++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/ovn-util.h b/lib/ovn-util.h index cd19919cb..46f57ad47 100644 --- a/lib/ovn-util.h +++ b/lib/ovn-util.h @@ -70,6 +70,19 @@ 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 0944a7b56..50d74f932 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(