diff options
| author | Anjali Kulkarni <[email protected]> | 2023-07-19 13:18:17 -0700 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2023-07-23 11:34:22 +0100 |
| commit | a4c9a56e6a2cdeeab7caef1f496b7bfefd95b50e (patch) | |
| tree | 6570a5cb17ff33f9b1f97649b8e86bb98cdd019b /include | |
| parent | a3377386b56420d78a4c0a931a40f9a25c3ca2bd (diff) | |
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 <[email protected]>
Reviewed-by: Liam R. Howlett <[email protected]>
Acked-by: Jakub Kicinski <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/netlink.h | 1 |
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, |