提交 a88bc302 编写于 作者: K Keefe Liu 提交者: Xie XiuQi

ipvlan: limit loop_delay ranges

euler inclusion
category: bugfix
bugzilla: 4411
CVE: NA

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

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

Fixes: f4661458116b ("ipvlan: Introduce local xmit queue for l2e mode")
Signed-off-by: NKeefe Liu <liuqifa@huawei.com>
Reviewed-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 225f6f11
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
#include "ipvlan.h" #include "ipvlan.h"
static int one = 1;
static int delay_max = 100;
int sysctl_ipvlan_loop_qlen = 131072; int sysctl_ipvlan_loop_qlen = 131072;
int sysctl_ipvlan_loop_delay = 10; int sysctl_ipvlan_loop_delay = 10;
static int ipvlan_default_mode = IPVLAN_MODE_L3; static int ipvlan_default_mode = IPVLAN_MODE_L3;
...@@ -22,7 +25,9 @@ static struct ctl_table ipvlan_table[] = { ...@@ -22,7 +25,9 @@ static struct ctl_table ipvlan_table[] = {
.data = &sysctl_ipvlan_loop_delay, .data = &sysctl_ipvlan_loop_delay,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler = proc_dointvec, .proc_handler = proc_dointvec_minmax,
.extra1 = &one,
.extra2 = &delay_max,
}, },
{ {
.procname = "loop_qlen", .procname = "loop_qlen",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册