[NETNS][IPV6]: Make multiple instance of sysctl tables.

Each network namespace wants its own set of sysctl value, eg. we
should not be able from a namespace to set a sysctl value for another
namespace , especially for the initial network namespace.

This patch duplicates the sysctl table when we register a new network
namespace for ipv6. The duplicated table are postfixed with the
"template" word to notify the developper the table is cloned.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Daniel Lezcano
2008-01-10 02:53:43 -08:00
committed by David S. Miller
parent 89918fc270
commit 760f2d0186
5 changed files with 89 additions and 14 deletions

View File

@@ -619,8 +619,8 @@ static inline int snmp6_unregister_dev(struct inet6_dev *idev)
#endif
#ifdef CONFIG_SYSCTL
extern ctl_table ipv6_route_table[];
extern ctl_table ipv6_icmp_table[];
extern ctl_table ipv6_route_table_template[];
extern ctl_table ipv6_icmp_table_template[];
extern int ipv6_sysctl_register(void);
extern void ipv6_sysctl_unregister(void);