Commit 58531931 authored by Anton Ivanov's avatar Anton Ivanov Committed by Richard Weinberger

um: Add checks to mtu parameter parsing

Adds a sanity check to the parsing of mtu command line param
Signed-off-by: default avatarAnton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 77f1073c
......@@ -121,6 +121,7 @@ static int get_mtu(struct arglist *def)
if (mtu != NULL) {
if (kstrtoul(mtu, 10, &result) == 0)
if ((result < (1 << 16) - 1) && (result >= 576))
return result;
}
return ETH_MAX_PACKET;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment