[NET]: Make the loopback device per network namespace.
This patch makes loopback_dev per network namespace. Adding code to create a different loopback device for each network namespace and adding the code to free a loopback device when a network namespace exits. This patch modifies all users the loopback_dev so they access it as init_net.loopback_dev, keeping all of the code compiling and working. A later pass will be needed to update the users to use something other than the initial network namespace. Signed-off-by:Eric W. Biederman <ebiederm@xmission.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- drivers/net/loopback.c 21 additions, 5 deletionsdrivers/net/loopback.c
- include/linux/netdevice.h 0 additions, 1 deletioninclude/linux/netdevice.h
- include/net/net_namespace.h 3 additions, 0 deletionsinclude/net/net_namespace.h
- net/core/dst.c 3 additions, 2 deletionsnet/core/dst.c
- net/decnet/dn_dev.c 2 additions, 2 deletionsnet/decnet/dn_dev.c
- net/decnet/dn_route.c 7 additions, 7 deletionsnet/decnet/dn_route.c
- net/ipv4/route.c 9 additions, 9 deletionsnet/ipv4/route.c
- net/ipv4/xfrm4_policy.c 1 addition, 1 deletionnet/ipv4/xfrm4_policy.c
- net/ipv6/addrconf.c 9 additions, 9 deletionsnet/ipv6/addrconf.c
- net/ipv6/netfilter/ip6t_REJECT.c 1 addition, 1 deletionnet/ipv6/netfilter/ip6t_REJECT.c
- net/ipv6/route.c 6 additions, 6 deletionsnet/ipv6/route.c
- net/ipv6/xfrm6_policy.c 1 addition, 1 deletionnet/ipv6/xfrm6_policy.c
- net/xfrm/xfrm_policy.c 1 addition, 1 deletionnet/xfrm/xfrm_policy.c
Loading
Please register or sign in to comment