diff mbox

[ovs-dev,v1,4/4] ovn: l3ha fix bundle action generation

Message ID 1500389610-5540-4-git-send-email-majopela@redhat.com
State Not Applicable, archived
Headers show

Commit Message

Miguel Angel Ajo July 18, 2017, 2:53 p.m. UTC
The bundle pointer wasn't properly re-pointed each time
we added a new slave port to the openflow action.

Signed-off-by: Miguel Angel Ajo <majopela@redhat.com>
---
 ovn/controller/physical.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/ovn/controller/physical.c b/ovn/controller/physical.c
index 1d0fe7f..719b020 100644
--- a/ovn/controller/physical.c
+++ b/ovn/controller/physical.c
@@ -695,16 +695,17 @@  consider_port_binding(enum mf_field_id mff_ovn_geneve,
                     }
                     ofpbuf_put(ofpacts_p, &tun->ofport,
                                sizeof tun->ofport);
+                    bundle = ofpacts_p->header;
                     bundle->n_slaves++;
                 }
             }
 
-            ofpact_finish_BUNDLE(ofpacts_p, &bundle);
             bundle->algorithm = NX_BD_ALG_ACTIVE_BACKUP;
             /* Although ACTIVE_BACKUP bundle algorithm seems to ignore
              * the next two fields, those are always set */
             bundle->basis = 0;
             bundle->fields = NX_HASH_FIELDS_ETH_SRC;
+            ofpact_finish_BUNDLE(ofpacts_p, &bundle);
         }
         ofctrl_add_flow(flow_table, OFTABLE_REMOTE_OUTPUT, 100, 0,
                         &match, ofpacts_p);