Reported-by: Felix Konstantin Maurer <[email protected]>
Signed-off-by: Greg Rose <[email protected]>
---
ofproto/ofproto-dpif-ipfix.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/ofproto/ofproto-dpif-ipfix.c b/ofproto/ofproto-dpif-ipfix.c
index 23fc51b..0fec990 100644
--- a/ofproto/ofproto-dpif-ipfix.c
+++ b/ofproto/ofproto-dpif-ipfix.c
@@ -1602,6 +1602,16 @@ ipfix_update_stats(struct dpif_ipfix_exporter *exporter,
}
}
+/* Update flow timestamp */
+static void
+ipfix_update_timestamp(struct ipfix_flow_cache_entry *entry)
+{
+ struct timeval now;
+
+ xgettimeofday(&now);
+ entry->flow_end_timestamp_usec = now.tv_usec + 1000000LL * now.tv_sec;
+}
+
/* Add an entry into a flow cache. The entry is either aggregated into
* an existing entry with the same flow key and free()d, or it is
* inserted into the cache. And IPFIX stats will be updated */
@@ -1635,6 +1645,7 @@ ipfix_cache_update(struct dpif_ipfix_exporter *exporter,
ipfix_cache_aggregate_entries(entry, old_entry);
free(entry);
ipfix_update_stats(exporter, false, current_flows, sampled_pkt_type);
+ ipfix_update_timestamp(old_entry);
}
}
--
1.8.3.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev