On Tue, 2017-04-18 at 21:14 -0400, Jamal Hadi Salim wrote:
> From: Jamal Hadi Salim <[email protected]>
So there is no more limit ? How user is supposed to size the buffer for
recvmsg() ?
> t->tca__pad1 = 0;
> @@ -1113,6 +1133,9 @@ static int tc_dump_action(struct sk_buff *skb, struct
> netlink_callback *cb)
> if (ret > 0) {
> nla_nest_end(skb, nest);
> ret = skb->len;
> + if (nla_put_u32(skb, TCAA_ACT_COUNT, cb->args[1]))
> + goto out_module_put;
> + cb->args[1] = 0;
I really do not see how you manage to get room to add one additional
attribute, if dump had to stop at N actions, filling whole skb.
You might be lucky because nla_put_u32() wants a bit less space than an
action ?
Presumably you need to reserve space before the dump of actions.