OSDN Git Service

can: initial support for network namespaces
authorMario Kicherer <dev@kicherer.org>
Tue, 21 Feb 2017 11:19:47 +0000 (12:19 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 4 Apr 2017 15:35:58 +0000 (17:35 +0200)
commit8e8cda6d737d356054c9eeef642aec0e8ae7e6bc
treebdc78138b5beca98f398c86ad65c526bbea2ebf8
parentdabf54dd1c6369160f8d4c793a8613dfb4e7848a
can: initial support for network namespaces

This patch adds initial support for network namespaces. The changes only
enable support in the CAN raw, proc and af_can code. GW and BCM still
have their checks that ensure that they are used only from the main
namespace.

The patch boils down to moving the global structures, i.e. the global
filter list and their /proc stats, into a per-namespace structure and passing
around the corresponding "struct net" in a lot of different places.

Changes since v1:
 - rebased on current HEAD (2bfe01e)
 - fixed overlong line

Signed-off-by: Mario Kicherer <dev@kicherer.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
include/linux/can/core.h
include/net/net_namespace.h
include/net/netns/can.h [new file with mode: 0644]
net/can/af_can.c
net/can/af_can.h
net/can/bcm.c
net/can/gw.c
net/can/proc.c
net/can/raw.c