There is no value in sending out NetFlow messages when the byte counter
(hence, packet counter) is 0. This does not often happen, but it can in
corner cases where a flow gets installed but never sees any traffic before
it is uninstalled.
CC: Peter Balland <peter@nicira.com>
struct rule *super = rule->super;
rule_account(ofproto, rule, 0);
- if (ofproto->netflow) {
+ if (ofproto->netflow && rule->byte_count) {
struct ofexpired expired;
expired.flow = rule->cr.flow;
expired.packet_count = rule->packet_count;