[PATCH] act: fix the logic of parsing actions

Cong Wang xiyou.wangcong at gmail.com
Thu May 15 16:26:20 PDT 2014


On Wed, Apr 30, 2014 at 5:21 AM, Thomas Haller <thaller at redhat.com> wrote:
>
> Hi Cong, Thomas,
>
>
> It seems wrong, that we loose the correlation between netlink
> attribute/order and the index.
>
> Especially, rtnl_act_msg_build() will now no longer produce what
> rtnl_act_msg_parse() parses.
>
> Anyway. I don't know :)
>
> @Thomas, could you please (N)ACK this patch?
>

Any review for this patch?

Looking at the kernel code:

        list_for_each_entry(a, actions, list) {
                nest = nla_nest_start(skb, a->order);
                if (nest == NULL)
                        goto nla_put_failure;
                err = tcf_action_dump_1(skb, a, bind, ref);
                if (err < 0)
                        goto errout;
                nla_nest_end(skb, nest);
        }

a->order does not always start with 0 within one filter.
Anyway, we can always remove the action with order == 0 so
that the rest actions start at 1, right?



More information about the libnl mailing list