From: Ben Pfaff Date: Fri, 6 Jul 2012 17:36:00 +0000 (-0700) Subject: ofproto: Revert change in flow cookie when an ofoperation fails. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41792464296d4ea9393adff3eea7bef514655cba;p=openvswitch ofproto: Revert change in flow cookie when an ofoperation fails. The flow_cookie member of struct ofoperation has always been there, but it seems that it's never been used. This fixes the code so that if a modify operation fails the rule's original flow cookie is restored. Signed-off-by: Ben Pfaff --- diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index dfa83e56..66e8bb86 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -3650,6 +3650,7 @@ ofopgroup_complete(struct ofopgroup *group) if (!op->error) { rule->modified = time_msec(); } else { + rule->flow_cookie = op->flow_cookie; free(rule->ofpacts); rule->ofpacts = op->ofpacts; rule->ofpacts_len = op->ofpacts_len;