diff options
author | Jiri Pirko <jiri@resnulli.us> | 2014-12-09 22:23:29 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-09 21:49:58 -0500 |
commit | 6ea3b446b9369c971bcab2a723d814d2295c77d3 (patch) | |
tree | cd245bff2e8eec5a08909211399f1c88ade08ef4 /net/sched/cls_tcindex.c | |
parent | f9c5c62db1c9bc20f396c3527b5074c4e7f1c275 (diff) | |
download | linux-stable-6ea3b446b9369c971bcab2a723d814d2295c77d3.tar.gz linux-stable-6ea3b446b9369c971bcab2a723d814d2295c77d3.tar.bz2 linux-stable-6ea3b446b9369c971bcab2a723d814d2295c77d3.zip |
net: sched: cls: use nla_nest_cancel instead of nlmsg_trim
To cancel nesting, this function is more convenient.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_tcindex.c')
-rw-r--r-- | net/sched/cls_tcindex.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c index 0d9d8911a621..bd49bf547a47 100644 --- a/net/sched/cls_tcindex.c +++ b/net/sched/cls_tcindex.c @@ -489,11 +489,10 @@ static int tcindex_dump(struct net *net, struct tcf_proto *tp, unsigned long fh, { struct tcindex_data *p = rtnl_dereference(tp->root); struct tcindex_filter_result *r = (struct tcindex_filter_result *) fh; - unsigned char *b = skb_tail_pointer(skb); struct nlattr *nest; - pr_debug("tcindex_dump(tp %p,fh 0x%lx,skb %p,t %p),p %p,r %p,b %p\n", - tp, fh, skb, t, p, r, b); + pr_debug("tcindex_dump(tp %p,fh 0x%lx,skb %p,t %p),p %p,r %p\n", + tp, fh, skb, t, p, r); pr_debug("p->perfect %p p->h %p\n", p->perfect, p->h); nest = nla_nest_start(skb, TCA_OPTIONS); @@ -543,7 +542,7 @@ static int tcindex_dump(struct net *net, struct tcf_proto *tp, unsigned long fh, return skb->len; nla_put_failure: - nlmsg_trim(skb, b); + nla_nest_cancel(skb, nest); return -1; } |