From 653fe3a3f50c74065cb5fa86dbe96b4884ece091 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 5 Oct 2011 15:26:49 -0700 Subject: [PATCH] ofproto-dpif: Do not output RSPAN packets to SPAN ports. 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 | 1 + vswitchd/vswitch.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index e89ae893..ffa025b5 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -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, diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 7d2a72a7..d53d9d79 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -1940,6 +1940,7 @@

Output port for selected packets, if nonempty.

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.

-- 2.30.2