If client_data is not copied when a new rule displaces an old one, then
the old rule's client data will be leaked and the new rule will have a null
pointer. This causes a segfault with, e.g.:
ovs-ofctl add-flow br0 "dl_type=0x800,nw_dst=10.245.7.0/16,actions=output:148"
ovs-ofctl mod-flows --strict br0 "dl_type=0x800,nw_dst=10.245.7.0/16,actions=output:149"
ovs-ofctl del-flows --strict br0 "dl_type=0x800,nw_dst=10.245.7.0/16"
Reported by partner.
/* Free the rule that was displaced, if any. */
if (displaced_rule) {
+ rule->wr.client_data = displaced_rule->wr.client_data;
wx_rule_destroy(wx, displaced_rule);
}
}