summaryrefslogtreecommitdiffstats
path: root/include/linux/netlink.h
diff options
context:
space:
mode:
authorAnjali Kulkarni <anjali.k.kulkarni@oracle.com>2023-07-19 13:18:17 -0700
committerDavid S. Miller <davem@davemloft.net>2023-07-23 11:34:22 +0100
commita4c9a56e6a2cdeeab7caef1f496b7bfefd95b50e (patch)
tree6570a5cb17ff33f9b1f97649b8e86bb98cdd019b /include/linux/netlink.h
parenta3377386b56420d78a4c0a931a40f9a25c3ca2bd (diff)
downloadlinux-a4c9a56e6a2cdeeab7caef1f496b7bfefd95b50e.tar.gz
linux-a4c9a56e6a2cdeeab7caef1f496b7bfefd95b50e.tar.bz2
linux-a4c9a56e6a2cdeeab7caef1f496b7bfefd95b50e.zip
netlink: Add new netlink_release function
A new function netlink_release is added in netlink_sock to store the protocol's release function. This is called when the socket is deleted. This can be supplied by the protocol via the release function in netlink_kernel_cfg. This is being added for the NETLINK_CONNECTOR protocol, so it can free it's data when socket is deleted. Signed-off-by: Anjali Kulkarni <anjali.k.kulkarni@oracle.com> Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netlink.h')
-rw-r--r--include/linux/netlink.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 3a6563681b50..75d7de34c908 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -50,6 +50,7 @@ struct netlink_kernel_cfg {
struct mutex *cb_mutex;
int (*bind)(struct net *net, int group);
void (*unbind)(struct net *net, int group);
+ void (*release) (struct sock *sk, unsigned long *groups);
};
struct sock *__netlink_kernel_create(struct net *net, int unit,