提交 58531931 编写于 作者: A Anton Ivanov 提交者: Richard Weinberger

um: Add checks to mtu parameter parsing

Adds a sanity check to the parsing of mtu command line param
Signed-off-by: NAnton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 77f1073c
......@@ -121,7 +121,8 @@ static int get_mtu(struct arglist *def)
if (mtu != NULL) {
if (kstrtoul(mtu, 10, &result) == 0)
return result;
if ((result < (1 << 16) - 1) && (result >= 576))
return result;
}
return ETH_MAX_PACKET;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册