mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
80d326fab5
commit
7175c88307
2 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue