projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77f1073
)
um: Add checks to mtu parameter parsing
author
Anton Ivanov
<anton.ivanov@cambridgegreys.com>
Fri, 9 Aug 2019 07:40:19 +0000
(08:40 +0100)
committer
Richard Weinberger
<richard@nod.at>
Sun, 15 Sep 2019 19:37:09 +0000
(21:37 +0200)
Adds a sanity check to the parsing of mtu command line param
Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/drivers/vector_kern.c
patch
|
blob
|
history
diff --git
a/arch/um/drivers/vector_kern.c
b/arch/um/drivers/vector_kern.c
index 8fa094770965b7982aff36216bbd3ab26b792321..45ec9bc2430fbaf1710a3a0b5070620c98d3a807 100644
(file)
--- a/
arch/um/drivers/vector_kern.c
+++ b/
arch/um/drivers/vector_kern.c
@@
-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;
}