- ovs_mutex_lock(&rule->mutex);
- rule->modified = now;
- if (op->type == OFOPERATION_REPLACE) {
- rule->created = now;
- }
- ovs_mutex_unlock(&rule->mutex);
- } else {
- ofproto_rule_change_cookie(ofproto, rule, op->flow_cookie);
- ovs_mutex_lock(&rule->mutex);
- rule->idle_timeout = op->idle_timeout;
- rule->hard_timeout = op->hard_timeout;
- ovs_mutex_unlock(&rule->mutex);
- if (op->actions) {
- const struct rule_actions *old_actions;
-
- ovs_mutex_lock(&rule->mutex);
- old_actions = rule_get_actions(rule);
- ovsrcu_set(&rule->actions, op->actions);
- ovs_mutex_unlock(&rule->mutex);
-
- op->actions = NULL;
- rule_actions_destroy(old_actions);
- }
- rule->flags = op->flags;