physical: Preserve output port across multicast group output.
authorBen Pfaff <blp@nicira.com>
Fri, 2 Oct 2015 19:44:53 +0000 (12:44 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 7 Oct 2015 20:15:09 +0000 (13:15 -0700)
Otherwise actions like this would not output to the same set of ports
for each output action (the second output would only forward to the
last port from the first output action):

    outport = "_MC_FLOOD"; output; output;

Obviously it's a corner case but it still seems worth implementing
correctly.

Found by inspection.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
ovn/controller/physical.c

index efa34a2..0c239df 100644 (file)
@@ -527,6 +527,10 @@ physical_run(struct controller_ctx *ctx, enum mf_field_id mff_ovn_geneve,
          * any. */
         bool local_ports = ofpacts.size > 0;
         if (local_ports) {
+            /* Following delivery to local logical ports, restore the multicast
+             * group as the logical output port. */
+            put_load(mc->tunnel_key, MFF_LOG_OUTPORT, 0, 32, &ofpacts);
+
             ofctrl_add_flow(flow_table, OFTABLE_LOCAL_OUTPUT, 100,
                             &match, &ofpacts);
         }