diff mbox

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

Message ID 1443548047-13144-2-git-send-email-gshetty@nicira.com
State Accepted
Headers show

Commit Message

Gurucharan Shetty Sept. 29, 2015, 5:34 p.m. UTC
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@nicira.com>
---
 ovn/controller/physical.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Russell Bryant Sept. 29, 2015, 5:50 p.m. UTC | #1
On 09/29/2015 01:34 PM, Gurucharan Shetty wrote:
> 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@nicira.com>

Acked-by: Russell Bryant <rbryant@redhat.com>
diff mbox

Patch

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 {