]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: Add compare function for netlink_table
authorGao feng <gaofeng@cn.fujitsu.com>
Thu, 6 Jun 2013 06:49:11 +0000 (14:49 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Jun 2013 09:39:42 +0000 (02:39 -0700)
commit3355f2f2d8c997589e2bfc9f3d3b64484de1dbda
treeb4343bfeaa8f929225268dd0ef3c92b31efbd4ae
parente9dafa9eb696f2d1d15e67535b3869dba24cc695
netlink: Add compare function for netlink_table

As we know, netlink sockets are private resource of
net namespace, they can communicate with each other
only when they in the same net namespace. this works
well until we try to add namespace support for other
subsystems which use netlink.

Don't like ipv4 and route table.., it is not suited to
make these subsytems belong to net namespace, Such as
audit and crypto subsystems,they are more suitable to
user namespace.

So we must have the ability to make the netlink sockets
in same user namespace can communicate with each other.

This patch adds a new function pointer "compare" for
netlink_table, we can decide if the netlink sockets can
communicate with each other through this netlink_table
self-defined compare function.

The behavior isn't changed if we don't provide the compare
function for netlink_table.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netlink.h
net/netlink/af_netlink.c
net/netlink/af_netlink.h