ofproto-dpif: Avoid segfault for ports with bundles in add_mirror_actions().
[sliver-openvswitch.git] / ofproto / ofproto-dpif.c
index bca9b8d..b42c66e 100644 (file)
@@ -4932,7 +4932,9 @@ add_mirror_actions(struct action_xlate_ctx *ctx, const struct flow *orig_flow)
         }
 
         ofport = get_odp_port(ofproto, nl_attr_get_u32(a));
-        mirrors |= ofport ? ofport->bundle->dst_mirrors : 0;
+        if (ofport && ofport->bundle) {
+            mirrors |= ofport->bundle->dst_mirrors;
+        }
     }
 
     if (!mirrors) {