[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpUmHZBHvykV0V2u9+Bja5-NwN1=z9NqZcxkB=zAfawoDQ@mail.gmail.com>
Date: Mon, 13 Jun 2016 15:58:53 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Jamal Hadi Salim <jhs@...atatu.com>
Cc: David Miller <davem@...emloft.net>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH net 1/1] net sched actions: bug fix dumping actions
directly didnt produce NLMSG_DONE
On Mon, Jun 13, 2016 at 3:08 PM, Jamal Hadi Salim <jhs@...atatu.com> wrote:
> From: Jamal Hadi Salim <jhs@...atatu.com>
>
> This refers to commands to direct action access as follows:
>
> sudo tc actions add action drop index 12
> sudo tc actions add action pipe index 10
>
> And then dumping them like so:
> sudo tc actions ls action gact
>
> iproute2 worked because it depended on absence of TCA_ACT_TAB TLV
> as end of message.
> This fix has been tested with iproute2 and is backward compatible.
>
> Signed-off-by: Jamal Hadi Salim <jhs@...atatu.com>
> ---
> net/sched/act_api.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sched/act_api.c b/net/sched/act_api.c
> index 336774a..c7a0b0d 100644
> --- a/net/sched/act_api.c
> +++ b/net/sched/act_api.c
> @@ -1118,7 +1118,7 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
> nla_nest_end(skb, nest);
> ret = skb->len;
> } else
> - nla_nest_cancel(skb, nest);
> + nlmsg_trim(skb, b);
So trim the whole tcamsg instead of just the nest attribute,
looks reasonable:
Acked-by: Cong Wang <xiyou.wangcong@...il.com>
Powered by blists - more mailing lists