Blob Blame History Raw
From fe499ffd96efda2ffd3f7f066faebe6ec41a83f4 Mon Sep 17 00:00:00 2001
Message-Id: <fe499ffd96efda2ffd3f7f066faebe6ec41a83f4.1588608928.git.lorenzo.bianconi@redhat.com>
In-Reply-To: <0b9d16670d5561d8300d2448cbd4686a3acdc57e.1588608928.git.lorenzo.bianconi@redhat.com>
References: <0b9d16670d5561d8300d2448cbd4686a3acdc57e.1588608928.git.lorenzo.bianconi@redhat.com>
From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Date: Wed, 29 Apr 2020 18:05:31 +0200
Subject: [PATCH 3/3] IPv6 PD: Disable pd processing if the router port is
 disabled.

Tested-by: Jianlin Shi <jishi@redhat.com>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
---
 northd/ovn-northd.c | 6 ++++++
 1 file changed, 6 insertions(+)

--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -9373,12 +9373,18 @@ build_lrouter_flows(struct hmap *datapat
         /* 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);