ofproto-dpif-xlate: Make IGMP packets always take slow path.
authorThadeu Lima de Souza Cascardo <cascardo@redhat.com>
Wed, 17 Jun 2015 17:12:19 +0000 (14:12 -0300)
committerBen Pfaff <blp@nicira.com>
Wed, 17 Jun 2015 18:07:28 +0000 (11:07 -0700)
IGMP packets need to take the slow path. Otherwise, packets that match
the same flow will not be processed by OVS. That might prevent OVS from
updating the expire time for entries already in the mdb, but also to
lose packets with different addresses in the payload.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-xlate.c

index f5dc272..a0d13c2 100644 (file)
@@ -2269,12 +2269,18 @@ xlate_normal(struct xlate_ctx *ctx)
         struct mcast_group *grp;
 
         if (flow->nw_proto == IPPROTO_IGMP) {
-            if (ctx->xin->may_learn) {
-                if (mcast_snooping_is_membership(flow->tp_src) ||
-                    mcast_snooping_is_query(flow->tp_src)) {
+            if (mcast_snooping_is_membership(flow->tp_src) ||
+                mcast_snooping_is_query(flow->tp_src)) {
+                if (ctx->xin->may_learn) {
                     update_mcast_snooping_table(ctx->xbridge, flow, vlan,
                                                 in_xbundle);
-                    }
+                }
+                /*
+                 * IGMP packets need to take the slow path, in order to be
+                 * processed for mdb updates. That will prevent expires
+                 * firing off even after hosts have sent reports.
+                 */
+                ctx->xout->slow |= SLOW_ACTION;
             }
 
             if (mcast_snooping_is_membership(flow->tp_src)) {