From: Neil McKee Date: Wed, 5 May 2010 20:24:27 +0000 (-0700) Subject: sflow: Properly fill in initial destination VLAN in sFlow output. X-Git-Tag: v1.0.0~54 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f9727d74050e1ff1c25ad0308a46e84c4d4870b5;p=sliver-openvswitch.git sflow: Properly fill in initial destination VLAN in sFlow output. --- diff --git a/ofproto/ofproto-sflow.c b/ofproto/ofproto-sflow.c index 5488724e0..f764dc4ec 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. */