net/ipv6: Fix misuse of proc_dointvec "skip_notify_on_dev_down"
authorEiichi Tsukata <devel@etsukata.com>
Tue, 25 Jun 2019 03:08:01 +0000 (12:08 +0900)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Jun 2019 19:59:04 +0000 (12:59 -0700)
/proc/sys/net/ipv6/route/skip_notify_on_dev_down assumes given value to be
0 or 1. Use proc_dointvec_minmax instead of proc_dointvec.

Fixes: 7c6bb7d2faaf ("net/ipv6: Add knob to skip DELROUTE message ondevice down")
Signed-off-by: Eiichi Tsukata <devel@etsukata.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c

index 11ad62effd562bf5a3e77875024323ab30c0cb86..aade636c6be64eb7b6e4ca25f6333dead7f9f6a9 100644 (file)
@@ -5281,7 +5281,7 @@ static struct ctl_table ipv6_route_table_template[] = {
                .data           =       &init_net.ipv6.sysctl.skip_notify_on_dev_down,
                .maxlen         =       sizeof(int),
                .mode           =       0644,
-               .proc_handler   =       proc_dointvec,
+               .proc_handler   =       proc_dointvec_minmax,
                .extra1         =       &zero,
                .extra2         =       &one,
        },