sched: act: count in the size of action flags bitfield
authorJiri Pirko <jiri@mellanox.com>
Tue, 25 Feb 2020 12:54:12 +0000 (13:54 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Feb 2020 01:10:44 +0000 (17:10 -0800)
The put of the flags was added by the commit referenced in fixes tag,
however the size of the message was not extended accordingly.

Fix this by adding size of the flags bitfield to the message size.

Fixes: e38226786022 ("net: sched: update action implementations to support flags")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_api.c

index 90a31b15585f61a5a3c406eb3e3985679164e044..8c466a712cda047001973652603c4f0e0c4e2b4d 100644 (file)
@@ -186,6 +186,7 @@ static size_t tcf_action_shared_attrs_size(const struct tc_action *act)
                + nla_total_size(IFNAMSIZ) /* TCA_ACT_KIND */
                + cookie_len /* TCA_ACT_COOKIE */
                + nla_total_size(0) /* TCA_ACT_STATS nested */
+               + nla_total_size(sizeof(struct nla_bitfield32)) /* TCA_ACT_FLAGS */
                /* TCA_STATS_BASIC */
                + nla_total_size_64bit(sizeof(struct gnet_stats_basic))
                /* TCA_STATS_PKT64 */