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-Tag: sliver-openvswitch-1.8.90-0~48^2~245 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=41792464296d4ea9393adff3eea7bef514655cba;p=sliver-openvswitch.git 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 dfa83e56e..66e8bb86c 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;