net/ipv6: Enforce limits for accept_unsolicited_na sysctl
authorArun Ajith S <aajith@arista.com>
Tue, 19 Apr 2022 10:59:10 +0000 (10:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Apr 2022 09:32:54 +0000 (10:32 +0100)
Fix mistake in the original patch where limits were specified but the
handler didn't take care of the limits.

Signed-off-by: Arun Ajith S <aajith@arista.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c

index 6473dc84b71d8c203651656eaace9e40457d2d9d..f01b8a3e19528e1a0e473a3b8ab2a84d3259d9a8 100644 (file)
@@ -7043,7 +7043,7 @@ static const struct ctl_table addrconf_sysctl[] = {
                .data           = &ipv6_devconf.accept_unsolicited_na,
                .maxlen         = sizeof(int),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec,
+               .proc_handler   = proc_dointvec_minmax,
                .extra1         = (void *)SYSCTL_ZERO,
                .extra2         = (void *)SYSCTL_ONE,
        },