if (rule) {
classifier_remove(&ofproto->cls, &rule->cr);
rule_destroy(rule);
- /* We don't call back to the flow_expired_cb because our caller would
- * explode, but perhaps we should fix that. At any rate should we sent
- * out a netflow message? */
}
}
? rule->super : rule, &odp_flow.stats);
}
rule->installed = false;
+
+ if (p->netflow) {
+ struct ofexpired expired;
+ expired.flow = rule->cr.flow;
+ expired.packet_count = rule->packet_count;
+ expired.byte_count = rule->byte_count;
+ expired.used = rule->used;
+ expired.created = rule->created;
+ expired.tcp_flags = rule->tcp_flags;
+ expired.ip_tos = rule->ip_tos;
+ netflow_expire(p->netflow, &expired);
+ }
}
}
\f
if (prev) {
queue_tx(buf, prev);
}
-
- if (!rule->cr.wc.wildcards
- && (p->netflow || p->ofhooks->flow_expired_cb)) {
- struct ofexpired expired;
- expired.flow = rule->cr.flow;
- expired.packet_count = rule->packet_count;
- expired.byte_count = rule->byte_count;
- expired.used = rule->used;
- expired.created = rule->created;
- expired.tcp_flags = rule->tcp_flags;
- expired.ip_tos = rule->ip_tos;
-
- if (p->netflow) {
- netflow_expire(p->netflow, &expired);
- }
-
- if (p->ofhooks->flow_expired_cb) {
- p->ofhooks->flow_expired_cb(&expired, p->aux);
- }
- }
}
static void