Skip to content

Commit

Permalink
net/ipv6: Fix misuse of proc_dointvec "flowlabel_reflect"
Browse files Browse the repository at this point in the history
/proc/sys/net/ipv6/flowlabel_reflect assumes written value to be in the
range of 0 to 3. Use proc_dointvec_minmax instead of proc_dointvec.

Fixes: 323a53c ("ipv6: tcp: enable flowlabel reflection in some RST packets")
Signed-off-by: Eiichi Tsukata <devel@etsukata.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eiichi Tsukata authored and David S. Miller committed Jul 2, 2019
1 parent 27ba405 commit 00dc330
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/sysctl_net_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static struct ctl_table ipv6_table_template[] = {
.data = &init_net.ipv6.sysctl.flowlabel_reflect,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec,
.proc_handler = proc_dointvec_minmax,
.extra1 = &zero,
.extra2 = &flowlabel_reflect_max,
},
Expand Down

0 comments on commit 00dc330

Please sign in to comment.