mirror of
https://github.com/openvswitch/ovs
synced 2025-10-17 14:28:02 +00:00
datapath: Serialize acts with original netlink len
Previously, we used the kernel-internal netlink actions length to calculate the size of messages to serialize back to userspace. However,the sw_flow_actions may not be formatted exactly the same as the actions on the wire, so store the original actions length when de-serializing and re-use the original length when serializing. Upstream: 8e2fed1 "openvswitch: Serialize acts with original netlink len" Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
This commit is contained in:
committed by
Joe Stringer
parent
e281bb2398
commit
c3bb15b38a
@@ -725,7 +725,7 @@ static size_t ovs_flow_cmd_msg_size(const struct sw_flow_actions *acts,
|
||||
|
||||
/* OVS_FLOW_ATTR_ACTIONS */
|
||||
if (should_fill_actions(ufid_flags))
|
||||
len += nla_total_size(acts->actions_len);
|
||||
len += nla_total_size(acts->orig_len);
|
||||
|
||||
return len
|
||||
+ nla_total_size(sizeof(struct ovs_flow_stats)) /* OVS_FLOW_ATTR_STATS */
|
||||
|
Reference in New Issue
Block a user