summaryrefslogtreecommitdiffstats
path: root/net/netlink/af_netlink.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-02-24 15:30:16 +0100
committerDavid S. Miller <davem@davemloft.net>2012-02-26 20:10:44 +0100
commit7175c883071515f0d4c1cece2646203b8a5a7415 (patch)
treef9dfa5be72432611f63f659fbe07ef4fbd6052bd /net/netlink/af_netlink.c
parentnetlink: add netlink_dump_control structure for netlink_dump_start() (diff)
downloadlinux-7175c883071515f0d4c1cece2646203b8a5a7415.tar.xz
linux-7175c883071515f0d4c1cece2646203b8a5a7415.zip
netlink: allow to pass data pointer to netlink_dump_start() callback
This patch allows you to pass a data pointer that can be accessed from the dump callback. Netfilter is going to use this patch to provide filtered dumps to user-space. This is specifically interesting in ctnetlink that may handle lots of conntrack entries. We can save precious cycles by skipping the conversion to TLV format of conntrack entries that are not interesting for user-space. More specifically, ctnetlink will include one operation to allow to filter the dumping of conntrack entries by ctmark values. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink/af_netlink.c')
-rw-r--r--net/netlink/af_netlink.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index ab74845876d2..32bb75324e76 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1750,6 +1750,7 @@ int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
cb->dump = control->dump;
cb->done = control->done;
cb->nlh = nlh;
+ cb->data = control->data;
cb->min_dump_alloc = control->min_dump_alloc;
atomic_inc(&skb->users);
cb->skb = skb;