diff options
author | Maciej Żenczykowski <maze@google.com> | 2016-10-07 11:00:49 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-08 06:43:56 +0300 |
commit | cb4a4c691e8631089759fc5d1faf8d6ccf581497 (patch) | |
tree | d60f1e4ebf1bcd62e46b6d154aa52ca7a6ca78f2 | |
parent | 7aa6ec2296614f2da8546bbfe8fca54bbbd8ae12 (diff) | |
download | linux-cb4a4c691e8631089759fc5d1faf8d6ccf581497.tar.xz |
ipv6 addrconf: disallow rtr_solicits < -1
This disallows setting /proc/sys/net/ipv6/conf/*/router_solicitations
to values below -1.
-1 continues to mean an unlimited number of retransmits.
Note: this depends on 'ipv6 addrconf: remove addrconf_sysctl_hop_limit()'
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv6/addrconf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index cbd9343751a2..d8983e15f859 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -5729,6 +5729,7 @@ int addrconf_sysctl_ignore_routes_with_linkdown(struct ctl_table *ctl, return ret; } +static int minus_one = -1; static const int one = 1; static const int two_five_five = 255; @@ -5789,7 +5790,8 @@ static const struct ctl_table addrconf_sysctl[] = { .data = &ipv6_devconf.rtr_solicits, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_dointvec_minmax, + .extra1 = &minus_one, }, { .procname = "router_solicitation_interval", |