mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
[NETLINK]: Add properly module refcounting for kernel netlink sockets.
- Remove bogus code for compiling netlink as module - Add module refcounting support for modules implementing a netlink protocol - Add support for autoloading modules that implement a netlink protocol as soon as someone opens a socket for that protocol Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
020b4c12db
commit
4fdb3bb723
17 changed files with 119 additions and 36 deletions
|
@ -774,7 +774,8 @@ static void tcpdiag_rcv(struct sock *sk, int len)
|
|||
|
||||
static int __init tcpdiag_init(void)
|
||||
{
|
||||
tcpnl = netlink_kernel_create(NETLINK_TCPDIAG, tcpdiag_rcv);
|
||||
tcpnl = netlink_kernel_create(NETLINK_TCPDIAG, tcpdiag_rcv,
|
||||
THIS_MODULE);
|
||||
if (tcpnl == NULL)
|
||||
return -ENOMEM;
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue