From f9727d74050e1ff1c25ad0308a46e84c4d4870b5 Mon Sep 17 00:00:00 2001 From: Neil McKee Date: Wed, 5 May 2010 13:24:27 -0700 Subject: [PATCH] sflow: Properly fill in initial destination VLAN in sFlow output. --- ofproto/ofproto-sflow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ofproto/ofproto-sflow.c b/ofproto/ofproto-sflow.c index 5488724e..f764dc4e 100644 --- a/ofproto/ofproto-sflow.c +++ b/ofproto/ofproto-sflow.c @@ -533,7 +533,9 @@ ofproto_sflow_received(struct ofproto_sflow *os, struct odp_msg *msg) switchElem.tag = SFLFLOW_EX_SWITCH; switchElem.flowType.sw.src_vlan = ntohs(flow.dl_vlan); switchElem.flowType.sw.src_priority = -1; /* XXX */ - switchElem.flowType.sw.dst_vlan = -1; /* Filled in correctly below. */ + /* Initialize the output VLAN and priority to be the same as the input, + but these fields can be overriden below if affected by an action. */ + switchElem.flowType.sw.dst_vlan = switchElem.flowType.sw.src_vlan; switchElem.flowType.sw.dst_priority = switchElem.flowType.sw.src_priority; /* Figure out the output ports. */ -- 2.30.2