From patchwork Wed Apr 29 16:05:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1279497 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: 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=Cd9ZqU7Z; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49C3K113JTz9sP7 for ; Thu, 30 Apr 2020 02:05:57 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2D78986B34; Wed, 29 Apr 2020 16:05:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R804Z2zadbg4; Wed, 29 Apr 2020 16:05:53 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3330686B2A; Wed, 29 Apr 2020 16:05:53 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1BD1FC0864; Wed, 29 Apr 2020 16:05:53 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id B2E65C0172 for ; Wed, 29 Apr 2020 16:05:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A894287813 for ; Wed, 29 Apr 2020 16:05:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gV6MYtsQfMJb for ; Wed, 29 Apr 2020 16:05:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by whitealder.osuosl.org (Postfix) with ESMTPS id BB7A68770C for ; Wed, 29 Apr 2020 16:05:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588176347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v7aXIr5ep/QsKufcMtzz/nSFoBCwKF+zyt1iUUHtyIk=; b=Cd9ZqU7ZVswV4q4rzPi7qZLTndznpHE1/lDxVYyynaFWZk4TaF84TM8czStjPw9IOsUxq1 mqd4v4m2h/NXzuS7WdIkPNB09Yfsm5X/p9DKFmdvGPMTml5iTjpLV9IlfdRKzItrOWBwbF pscwzT5h34Z3YIefVwCNots5Un1uz5s= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-303-WwC6a6LBMk6jZVNF6gl5hw-1; Wed, 29 Apr 2020 12:05:45 -0400 X-MC-Unique: WwC6a6LBMk6jZVNF6gl5hw-1 Received: by mail-wm1-f71.google.com with SMTP id t62so1428659wma.0 for ; Wed, 29 Apr 2020 09:05:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=h8nYhxbBE3eDnVXRE0iYGmsX7nAIdK3+rkncSm8U7ks=; b=jIV9tO/zB5ksg0oE2tfHOWPVqEpWxZPqke24qJssgwBLo/CuDdbBvNbbiDjD9pOkSl /0PSkkVWZAp6sA7FVTaQPX/ewPUl7TMG2H6DI+0St6PJEW8/HaONy490zRqNRnBHriBN Uk9Shq2xgC6I7XFa2WB8hTWWsH53hGnSpZGnzeeE3qOx7PiMh4G5OYpBYYOZ4uyjeukX vtL77tSecAWZSye2C5To6Kv3i0up0binUZqNXd0aavWE8xwx24AsTLd2JPF3d2KbDU/I UyDqhDKJPwUzNAckYU33IXgwinaxyWFi+yNYWxcXY5rq0qEft0ApSrcOErQsvNmFiqX4 IM2g== X-Gm-Message-State: AGi0Pub19fh27DI7fCTtkHdxvD/cL5ec72BBfy0XoE2Wv7bO4MW0kFNq mroJW1YSi2ELg6XwKeYxCQLYnFLshZVZUqOZsaRNHGfsGWavuN+y6OaqEf0gz2TfbzZ6mbckBk7 BRZX38kihYQ5PKX00wQ== X-Received: by 2002:a1c:2dc7:: with SMTP id t190mr3837649wmt.129.1588176344694; Wed, 29 Apr 2020 09:05:44 -0700 (PDT) X-Google-Smtp-Source: APiQypKNfBnCtRZlcs8rHV8P6Sx5cKtWok+PmSpdtPbuhfqJGLL0Tr+zIB/0tIxiQzC9cLYxJvJHkw== X-Received: by 2002:a1c:2dc7:: with SMTP id t190mr3837636wmt.129.1588176344519; Wed, 29 Apr 2020 09:05:44 -0700 (PDT) Received: from localhost.localdomain.com ([151.66.196.206]) by smtp.gmail.com with ESMTPSA id k184sm8564207wmf.9.2020.04.29.09.05.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 09:05:44 -0700 (PDT) From: Lorenzo Bianconi To: ovs-dev@openvswitch.org Date: Wed, 29 Apr 2020 18:05:31 +0200 Message-Id: <90cee3df05060decc1296b6134342b0af2450806.1588176268.git.lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 2/2] IPv6 PD: disable pd processing if the router port is disabled 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" Disable IPv6 processing if the logical router port is disabled Tested-by: Jianlin Shi Signed-off-by: Lorenzo Bianconi --- northd/ovn-northd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c index 742aad85e..e31794c4b 100644 --- a/northd/ovn-northd.c +++ b/northd/ovn-northd.c @@ -9382,12 +9382,18 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports, /* enable IPv6 prefix delegation */ bool prefix_delegation = smap_get_bool(&op->nbrp->options, "prefix_delegation", false); + if (!lrport_is_enabled(op->nbrp)) { + prefix_delegation = false; + } smap_add(&options, "ipv6_prefix_delegation", prefix_delegation ? "true" : "false"); sbrec_port_binding_set_options(op->sb, &options); bool ipv6_prefix = smap_get_bool(&op->nbrp->options, "prefix", false); + if (!lrport_is_enabled(op->nbrp)) { + ipv6_prefix = false; + } smap_add(&options, "ipv6_prefix", ipv6_prefix ? "true" : "false"); sbrec_port_binding_set_options(op->sb, &options);