X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fofproto.c;h=b96fa6e67087529bad45db80c76fb95584860062;hb=308881afb;hp=33cd85e595da875f1dff9e1f0aae01ed6d5dc28c;hpb=a75531e53e03d9fe9915f8041759601c07e47914;p=sliver-openvswitch.git diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 33cd85e59..b96fa6e67 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -2252,7 +2252,7 @@ add_flow(struct ofproto *ofproto, struct ofconn *ofconn, rule->cr = fm->cr; rule->pending = NULL; rule->flow_cookie = fm->cookie; - rule->created = time_msec(); + rule->created = rule->modified = time_msec(); rule->idle_timeout = fm->idle_timeout; rule->hard_timeout = fm->hard_timeout; rule->table_id = table - ofproto->tables; @@ -2315,6 +2315,8 @@ modify_flows__(struct ofproto *ofproto, struct ofconn *ofconn, rule->actions = ofputil_actions_clone(fm->actions, fm->n_actions); rule->n_actions = fm->n_actions; rule->ofproto->ofproto_class->rule_modify_actions(rule); + } else { + rule->modified = time_msec(); } rule->flow_cookie = fm->cookie; } @@ -2944,7 +2946,9 @@ ofoperation_complete(struct ofoperation *op, int error) break; case OFOPERATION_MODIFY: - if (error) { + if (!error) { + rule->modified = time_msec(); + } else { free(rule->actions); rule->actions = op->actions; rule->n_actions = op->n_actions;