summaryrefslogtreecommitdiffstats
path: root/kernel/ip_set_core.c
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-01-26 22:37:11 +0100
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-01-26 22:37:11 +0100
commit8271afcab2f219158ec5d63f6b625cd64dcc98a8 (patch)
tree959efb9a0ec4c103f4456d048aa3d00ca0bf53f5 /kernel/ip_set_core.c
parentfa7f70f8042c5fd8b64821cbfd66fdea5c1a2a67 (diff)
Send (N)ACK at dumping only when NLM_F_ACK is set
Missing check of the flag NLM_F_ACK is added to the kernel - and userspace does set it too (Patrick McHardy's review)
Diffstat (limited to 'kernel/ip_set_core.c')
-rw-r--r--kernel/ip_set_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/ip_set_core.c b/kernel/ip_set_core.c
index 023813b..3071d3f 100644
--- a/kernel/ip_set_core.c
+++ b/kernel/ip_set_core.c
@@ -973,9 +973,11 @@ ip_set_dump_start(struct sk_buff *skb, struct netlink_callback *cb)
if (cb->args[0] == DUMP_INIT) {
ret = dump_init(cb);
if (ret < 0) {
+ struct nlmsghdr *nlh = nlmsg_hdr(cb->skb);
/* We have to create and send the error message
* manually :-( */
- netlink_ack(cb->skb, nlmsg_hdr(cb->skb), ret);
+ if (nlh->nlmsg_flags & NLM_F_ACK)
+ netlink_ack(cb->skb, nlh, ret);
return ret;
}
}