Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipv6: Add sanity checks on ipv6_devconf.rpl_seg_enabled

In ipv6_rpl_srh_rcv() we use min(net->ipv6.devconf_all->rpl_seg_enabled,
idev->cnf.rpl_seg_enabled) is intended to return 0 when either value is
zero, but if one of the values is negative it will in fact return non-zero.

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Link: https://patch.msgid.link/20250901123726.1972881-3-yuehaibing@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Yue Haibing and committed by
Jakub Kicinski
3d95261e b0bc6451

+3 -1
+3 -1
net/ipv6/addrconf.c
··· 7238 7238 .data = &ipv6_devconf.rpl_seg_enabled, 7239 7239 .maxlen = sizeof(int), 7240 7240 .mode = 0644, 7241 - .proc_handler = proc_dointvec, 7241 + .proc_handler = proc_dointvec_minmax, 7242 + .extra1 = SYSCTL_ZERO, 7243 + .extra2 = SYSCTL_ONE, 7242 7244 }, 7243 7245 { 7244 7246 .procname = "ioam6_enabled",