diff options
author | Jamal Hadi Salim <jhs@mojatatu.com> | 2016-06-14 00:08:42 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-15 23:02:53 +0200 |
commit | ebecaa6662b0a9c3590bd644a4cec6f9d96818b7 (patch) | |
tree | 65b28d9f79159489932c124a55bb8496159138cd /net | |
parent | act_ipt: fix a bind refcnt leak (diff) | |
download | linux-ebecaa6662b0a9c3590bd644a4cec6f9d96818b7.tar.xz linux-ebecaa6662b0a9c3590bd644a4cec6f9d96818b7.zip |
net sched actions: bug fix dumping actions directly didnt produce NLMSG_DONE
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@mojatatu.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/act_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 336774a535c3..c7a0b0d481c0 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); nlh->nlmsg_len = skb_tail_pointer(skb) - b; if (NETLINK_CB(cb->skb).portid && ret) |