From 4836f9f2bfa5dc0531bd1d828aae96ccd6b415cb Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Fri, 13 Nov 2009 18:53:28 -0800 Subject: [PATCH 1/1] ofproto: Update time of super-rule to match sub-rule Rules keep track of their creation and last used time. When a sub-rule is updated, it wasn't updating the time of its super-rule. This commit fixes that behavior. Thanks to Jesse Gross for the help tracking this down. --- ofproto/ofproto.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index b49ea49f4..2894e2d33 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -2733,6 +2733,9 @@ update_time(struct ofproto *ofproto, struct rule *rule, long long int used = msec_from_nsec(stats->used_sec, stats->used_nsec); if (used > rule->used) { rule->used = used; + if (rule->super && used > rule->super->used) { + rule->super->used = used; + } netflow_flow_update_time(ofproto->netflow, &rule->nf_flow, used); } } -- 2.43.0