aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-06-28 01:17:11 -0400
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-07-03 04:51:55 -0400
commit778d80be52699596bf70e0eb0761cf5e1e46088d (patch)
tree607d0bd6fe7c7d6f59d88b9287fc534f6693998d /net/ipv6/addrconf.c
parent5ce83afaac956238c3c25f60a899c511e9d8cbf4 (diff)
ipv6: Add disable_ipv6 sysctl to disable IPv6 operaion on specific interface.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 8b6875f02039..8c5cff50bbed 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -183,6 +183,7 @@ struct ipv6_devconf ipv6_devconf __read_mostly = {
183#endif 183#endif
184 .proxy_ndp = 0, 184 .proxy_ndp = 0,
185 .accept_source_route = 0, /* we do not accept RH0 by default. */ 185 .accept_source_route = 0, /* we do not accept RH0 by default. */
186 .disable_ipv6 = 0,
186}; 187};
187 188
188static struct ipv6_devconf ipv6_devconf_dflt __read_mostly = { 189static struct ipv6_devconf ipv6_devconf_dflt __read_mostly = {
@@ -215,6 +216,7 @@ static struct ipv6_devconf ipv6_devconf_dflt __read_mostly = {
215#endif 216#endif
216 .proxy_ndp = 0, 217 .proxy_ndp = 0,
217 .accept_source_route = 0, /* we do not accept RH0 by default. */ 218 .accept_source_route = 0, /* we do not accept RH0 by default. */
219 .disable_ipv6 = 0,
218}; 220};
219 221
220/* IPv6 Wildcard Address and Loopback Address defined by RFC2553 */ 222/* IPv6 Wildcard Address and Loopback Address defined by RFC2553 */
@@ -3657,6 +3659,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf,
3657#ifdef CONFIG_IPV6_MROUTE 3659#ifdef CONFIG_IPV6_MROUTE
3658 array[DEVCONF_MC_FORWARDING] = cnf->mc_forwarding; 3660 array[DEVCONF_MC_FORWARDING] = cnf->mc_forwarding;
3659#endif 3661#endif
3662 array[DEVCONF_DISABLE_IPV6] = cnf->disable_ipv6;
3660} 3663}
3661 3664
3662static inline size_t inet6_if_nlmsg_size(void) 3665static inline size_t inet6_if_nlmsg_size(void)
@@ -4216,6 +4219,14 @@ static struct addrconf_sysctl_table
4216 }, 4219 },
4217#endif 4220#endif
4218 { 4221 {
4222 .ctl_name = CTL_UNNUMBERED,
4223 .procname = "disable_ipv6",
4224 .data = &ipv6_devconf.disable_ipv6,
4225 .maxlen = sizeof(int),
4226 .mode = 0644,
4227 .proc_handler = &proc_dointvec,
4228 },
4229 {
4219 .ctl_name = 0, /* sentinel */ 4230 .ctl_name = 0, /* sentinel */
4220 } 4231 }
4221 }, 4232 },