[ovs-dev] [PATCH 2/3] ovn-controller: Fix a case wherein tag can be zero.

Gurucharan Shetty shettyg at nicira.com
Tue Sep 29 17:34:06 UTC 2015


If the ovn-nb DB's logical_port table is populated such
that tag is zero, we should not consider that record.

Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
 ovn/controller/physical.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ovn/controller/physical.c b/ovn/controller/physical.c
index f57acbc..5280916 100644
--- a/ovn/controller/physical.c
+++ b/ovn/controller/physical.c
@@ -253,9 +253,12 @@ physical_run(struct controller_ctx *ctx, enum mf_field_id mff_ovn_geneve,
             }
             ofport = u16_to_ofp(simap_get(&localnet_to_ofport, network));
         } else if (binding->parent_port) {
+            if (!binding->tag || !*binding->tag) {
+                continue;
+            }
             ofport = u16_to_ofp(simap_get(&localvif_to_ofport,
                                           binding->parent_port));
-            if (ofport && binding->tag) {
+            if (ofport) {
                 tag = *binding->tag;
             }
         } else {
-- 
1.9.1




More information about the dev mailing list