]> 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)
commitbc93ffac60fe2918c67bd0e97f8664aff766a24c
treebdc78138b5beca98f398c86ad65c526bbea2ebf8
parentc81a4adcbdbb1664ad86625f9f081b6a18544901
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 (46db251)
 - 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