Skip to content

Commit

Permalink
ofproto: Fix statistics of removed flow.
Browse files Browse the repository at this point in the history
'fr' is a new variable on the stack.  '+=' here adds the real statistics
to a random stack memory.

Fixes: 1644131 ("Add offload packets statistics")
Acked-by: Roi Dayan <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
igsilya committed May 15, 2020
1 parent 3c18bb0 commit c36bba3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ofproto/ofproto.c
Original file line number Diff line number Diff line change
Expand Up @@ -6085,8 +6085,8 @@ ofproto_rule_send_removed(struct rule *rule)
fr.hard_timeout = rule->hard_timeout;
ovs_mutex_unlock(&rule->mutex);
rule->ofproto->ofproto_class->rule_get_stats(rule, &stats, &used);
fr.packet_count += stats.n_packets;
fr.byte_count += stats.n_bytes;
fr.packet_count = stats.n_packets;
fr.byte_count = stats.n_bytes;
connmgr_send_flow_removed(connmgr, &fr);
ovs_mutex_unlock(&ofproto_mutex);
}
Expand Down

0 comments on commit c36bba3

Please sign in to comment.