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 e89ae89..ffa025b 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 7d2a72a..d53d9d7 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>