]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite5f264b3ad6bc283e071eaac7ce90931adb198e4
treebdc78138b5beca98f398c86ad65c526bbea2ebf8
parent4e90a0b0d9bb31fc6a07d8e2a0eef5751d74e8f0
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 (46a5a28)
 - 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