2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-19 14:37:21 +00:00

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 <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2012-03-20 11:32:08 -07:00
parent 5341d04613
commit 9ed20b8a36

View File

@@ -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)); cls_rule_init_catchall(&fm->cr, ntohs(learn->priority));
fm->cookie = learn->cookie; fm->cookie = learn->cookie;
fm->cookie_mask = htonll(UINT64_MAX);
fm->table_id = learn->table_id; fm->table_id = learn->table_id;
fm->command = OFPFC_MODIFY_STRICT; fm->command = OFPFC_MODIFY_STRICT;
fm->idle_timeout = ntohs(learn->idle_timeout); fm->idle_timeout = ntohs(learn->idle_timeout);