netflow: Correctly track flow creation time.
authorBen Pfaff <blp@nicira.com>
Thu, 10 Apr 2014 17:18:42 +0000 (10:18 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 10 Apr 2014 17:18:42 +0000 (10:18 -0700)
'created' is supposed to be the time the flow was created, but it was
getting reset to zero on every expiration, causing the flow start time to
be wonky after the first active expiration on a flow.

Reported-by: Lior Neudorfer <lior@guardicore.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
ofproto/netflow.c

index 19ca80f..35c8e33 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, 2010, 2011 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2014 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -180,7 +180,6 @@ netflow_expire(struct netflow *nf, struct netflow_flow *nf_flow,
     }
 
     /* Update flow tracking data. */
-    nf_flow->created = 0;
     nf_flow->packet_count_off = expired->packet_count;
     nf_flow->byte_count_off = expired->byte_count;
     nf_flow->tcp_flags = 0;