ofproto-dpif: Do not output RSPAN packets to SPAN ports.
authorBen Pfaff <blp@nicira.com>
Wed, 5 Oct 2011 22:26:49 +0000 (15:26 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 17 Nov 2011 18:11:52 +0000 (10:11 -0800)
It's always been my intention that ports used as port mirroring
destinations (SPAN) be reserved solely for that purpose.  When SPAN and
RSPAN are both configured, however, RSPAN mirror packets could get directed
to SPAN ports, which was unintentional.

This commit also updates the documentation to make it clear (if that is
even necessary) that this behavior is intentional.

Found by inspection.

ofproto/ofproto-dpif.c
vswitchd/vswitch.xml

index e89ae893fee1f319e677656851a06fd40219972f..ffa025b5148b045b172f725a222fc0d2d6a69820 100644 (file)
@@ -4611,6 +4611,7 @@ compose_mirror_dsts(struct action_xlate_ctx *ctx,
 
                 HMAP_FOR_EACH (bundle, hmap_node, &ofproto->bundles) {
                     if (ofbundle_includes_vlan(bundle, m->out_vlan)
+                        && !bundle->mirror_out
                         && set_dst(ctx, &dst, in_bundle, bundle))
                     {
                         /* set_dst() got dst->vid from the input packet's VLAN,
index 7d2a72a732813cb78b358befe4b57a5c81274510..d53d9d79f6950703a82f215e411d67a362b9d947 100644 (file)
         <p>Output port for selected packets, if nonempty.</p>
         <p>Specifying a port for mirror output reserves that port exclusively
         for mirroring.  No frames other than those selected for mirroring
+        via this column
         will be forwarded to the port, and any frames received on the port
         will be discarded.</p>
         <p>