From 41792464296d4ea9393adff3eea7bef514655cba Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 6 Jul 2012 10:36:00 -0700 Subject: [PATCH] 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 --- ofproto/ofproto.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.30.2