aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2006-03-20 19:55:26 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-20 19:55:26 -0500
commitc4fd30eb18666972230689eb30e8f90844bce635 (patch)
treef1b8daddeb21d7d1390fa1ae820bf2b5ffa8d276 /net/ipv6/addrconf.c
parent65f5c7c1143fb8eed5bc7e7d8c926346e00fe3c0 (diff)
[IPV6]: ADDRCONF: Add accept_ra_pinfo sysctl.
This controls whether we accept Prefix Information in RAs. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
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 fbcdcc6ba93b..631b51d0ccbc 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -166,6 +166,7 @@ struct ipv6_devconf ipv6_devconf = {
166#endif 166#endif
167 .max_addresses = IPV6_MAX_ADDRESSES, 167 .max_addresses = IPV6_MAX_ADDRESSES,
168 .accept_ra_defrtr = 1, 168 .accept_ra_defrtr = 1,
169 .accept_ra_pinfo = 1,
169}; 170};
170 171
171static struct ipv6_devconf ipv6_devconf_dflt = { 172static struct ipv6_devconf ipv6_devconf_dflt = {
@@ -188,6 +189,7 @@ static struct ipv6_devconf ipv6_devconf_dflt = {
188#endif 189#endif
189 .max_addresses = IPV6_MAX_ADDRESSES, 190 .max_addresses = IPV6_MAX_ADDRESSES,
190 .accept_ra_defrtr = 1, 191 .accept_ra_defrtr = 1,
192 .accept_ra_pinfo = 1,
191}; 193};
192 194
193/* IPv6 Wildcard Address and Loopback Address defined by RFC2553 */ 195/* IPv6 Wildcard Address and Loopback Address defined by RFC2553 */
@@ -3119,6 +3121,7 @@ static void inline ipv6_store_devconf(struct ipv6_devconf *cnf,
3119#endif 3121#endif
3120 array[DEVCONF_MAX_ADDRESSES] = cnf->max_addresses; 3122 array[DEVCONF_MAX_ADDRESSES] = cnf->max_addresses;
3121 array[DEVCONF_ACCEPT_RA_DEFRTR] = cnf->accept_ra_defrtr; 3123 array[DEVCONF_ACCEPT_RA_DEFRTR] = cnf->accept_ra_defrtr;
3124 array[DEVCONF_ACCEPT_RA_PINFO] = cnf->accept_ra_pinfo;
3122} 3125}
3123 3126
3124static int inet6_fill_ifinfo(struct sk_buff *skb, struct inet6_dev *idev, 3127static int inet6_fill_ifinfo(struct sk_buff *skb, struct inet6_dev *idev,
@@ -3580,6 +3583,14 @@ static struct addrconf_sysctl_table
3580 .proc_handler = &proc_dointvec, 3583 .proc_handler = &proc_dointvec,
3581 }, 3584 },
3582 { 3585 {
3586 .ctl_name = NET_IPV6_ACCEPT_RA_PINFO,
3587 .procname = "accept_ra_pinfo",
3588 .data = &ipv6_devconf.accept_ra_pinfo,
3589 .maxlen = sizeof(int),
3590 .mode = 0644,
3591 .proc_handler = &proc_dointvec,
3592 },
3593 {
3583 .ctl_name = 0, /* sentinel */ 3594 .ctl_name = 0, /* sentinel */
3584 } 3595 }
3585 }, 3596 },