提交 84ba1600 编写于 作者: K Keefe LIU 提交者: Zheng Zengkai

ipvlan: limit loop_qlen ranges

hulk inclusion
category: bugfix
bugzilla: 4411, https://gitee.com/openeuler/kernel/issues/I4IHL1
CVE: NA

-------------------------------------------------

In order to avoid integer overflow, we should limit
the ranges of loop_qlen value.

Fixes: 997518dea253 ("ipvlan: Introduce local xmit queue for l2e mode")
Signed-off-by: NKeefe Liu <liuqifa@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NLu Wei <luwei32@huawei.com>
Reviewed-by: NYue Haibing <yuehaibing@huawei.com>
Reviewed-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 73c29430
......@@ -6,6 +6,9 @@
static int one = 1;
static int delay_max = 100;
/* set loop queue length from 0 to 10 big packets(65536) */
static int qlen_min;
static int qlen_max = 655360;
int sysctl_ipvlan_loop_qlen = 131072;
int sysctl_ipvlan_loop_delay = 10;
......@@ -29,7 +32,9 @@ static struct ctl_table ipvlan_table[] = {
.data = &sysctl_ipvlan_loop_qlen,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec,
.proc_handler = proc_dointvec_minmax,
.extra1 = &qlen_min,
.extra2 = &qlen_max,
},
{ }
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册