From: Ben Pfaff Date: Tue, 20 Mar 2012 18:32:08 +0000 (-0700) Subject: learn: Initialize cookie_mask in constructed flow_mod. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ed20b8a36555a39e3cda9900c6adc0e2f5ae2c2;p=openvswitch learn: Initialize cookie_mask in constructed flow_mod. Otherwise the "learn" action may not correctly set the cookie in flows that it creates. Found by valgrind. Signed-off-by: Ben Pfaff --- diff --git a/lib/learn.c b/lib/learn.c index 9ca8b65a..94fc1b02 100644 --- a/lib/learn.c +++ b/lib/learn.c @@ -197,6 +197,7 @@ learn_execute(const struct nx_action_learn *learn, const struct flow *flow, cls_rule_init_catchall(&fm->cr, ntohs(learn->priority)); fm->cookie = learn->cookie; + fm->cookie_mask = htonll(UINT64_MAX); fm->table_id = learn->table_id; fm->command = OFPFC_MODIFY_STRICT; fm->idle_timeout = ntohs(learn->idle_timeout);