diff options
author | Mario Kicherer <dev@kicherer.org> | 2017-02-21 14:19:47 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2017-04-04 18:35:58 +0300 |
commit | 8e8cda6d737d356054c9eeef642aec0e8ae7e6bc (patch) | |
tree | bdc78138b5beca98f398c86ad65c526bbea2ebf8 /net/can/gw.c | |
parent | dabf54dd1c6369160f8d4c793a8613dfb4e7848a (diff) | |
download | linux-8e8cda6d737d356054c9eeef642aec0e8ae7e6bc.tar.xz |
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>
Diffstat (limited to 'net/can/gw.c')
-rw-r--r-- | net/can/gw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/can/gw.c b/net/can/gw.c index 7056a1a2bb70..3c117a33e15f 100644 --- a/net/can/gw.c +++ b/net/can/gw.c @@ -440,14 +440,14 @@ static void can_can_gw_rcv(struct sk_buff *skb, void *data) static inline int cgw_register_filter(struct cgw_job *gwj) { - return can_rx_register(gwj->src.dev, gwj->ccgw.filter.can_id, + return can_rx_register(&init_net, gwj->src.dev, gwj->ccgw.filter.can_id, gwj->ccgw.filter.can_mask, can_can_gw_rcv, gwj, "gw", NULL); } static inline void cgw_unregister_filter(struct cgw_job *gwj) { - can_rx_unregister(gwj->src.dev, gwj->ccgw.filter.can_id, + can_rx_unregister(&init_net, gwj->src.dev, gwj->ccgw.filter.can_id, gwj->ccgw.filter.can_mask, can_can_gw_rcv, gwj); } |