Skip to contentSkip to conversation

net/ipv6: Fix misuse of proc_dointvec "flowlabel_reflect"

PATCH Applied Eiichi Tsukata 2 participants 2 messages Jun 28, 2019 – Jul 2, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ipv6: Fix misuse of proc_dointvec "flowlabel_reflect"

/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 323a53c41292 ("ipv6: tcp: enable flowlabel reflection in some RST packets")
---
 net/ipv6/sysctl_net_ipv6.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/sysctl_net_ipv6.c +1 -1
index 6d86fac472e7..831573461e19 100644
@@ -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		= &three,
 	},
Signature · 1 line
2.21.0
maintainer Applied
#1 lore raw

From: Eiichi Tsukata <[email protected]>
Date: Fri, 28 Jun 2019 11:37:14 +0900

Quoted 5 lines

/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 323a53c41292 ("ipv6: tcp: enable flowlabel reflection in some RST packets")

Applied, thanks.