[NET]: Make AF_PACKET handle multiple network namespaces
This is done by making packet_sklist_lock and packet_sklist per network namespace and adding an additional filter condition on received packets to ensure they came from the proper network namespace. Changes from v1: - prohibit to call inet_dgram_ops.ioctl in other than init_net Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
4b3da706bb
commit
d12d01d6b4
@@ -32,6 +32,10 @@ struct net {
|
||||
struct hlist_head *dev_index_head;
|
||||
|
||||
struct sock *rtnl; /* rtnetlink socket */
|
||||
|
||||
/* List of all packet sockets. */
|
||||
rwlock_t packet_sklist_lock;
|
||||
struct hlist_head packet_sklist;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
|
Reference in New Issue
Block a user