mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
openvswitch: 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. Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
538e456319
commit
8e2fed1c0c
3 changed files with 4 additions and 1 deletions
|
@ -713,7 +713,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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue