summaryrefslogtreecommitdiffstats
path: root/net/sched/cls_api.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-02-24 06:04:20 +0100
committerDavid S. Miller <davem@davemloft.net>2018-02-24 06:04:20 +0100
commitf74290fdb363665538743d14c4f00aeacdb68d87 (patch)
treea5c8f6332f06550e935d1e557ac927302f7f63c4 /net/sched/cls_api.c
parentnet: fib_rules: Add new attribute to set protocol (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff)
downloadlinux-f74290fdb363665538743d14c4f00aeacdb68d87.tar.xz
linux-f74290fdb363665538743d14c4f00aeacdb68d87.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r--net/sched/cls_api.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 3e14d38e5d42..9d1a8bbf8152 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -1397,13 +1397,18 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb)
nla_get_u32(tca[TCA_CHAIN]) != chain->index)
continue;
if (!tcf_chain_dump(chain, q, parent, skb, cb,
- index_start, &index))
+ index_start, &index)) {
+ err = -EMSGSIZE;
break;
+ }
}
cb->args[0] = index;
out:
+ /* If we did no progress, the error (EMSGSIZE) is real */
+ if (skb->len == 0 && err)
+ return err;
return skb->len;
}