projects
/
project
/
odhcpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8d40a5
)
config: limit ra_mtu to 65535
author
Hans Dedecker
<dedeckeh@gmail.com>
Mon, 15 May 2017 15:42:52 +0000
(17:42 +0200)
committer
Hans Dedecker
<dedeckeh@gmail.com>
Mon, 15 May 2017 18:04:56 +0000
(20:04 +0200)
Limit the maximum ra_mtu to 65535
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
src/config.c
patch
|
blob
|
history
diff --git
a/src/config.c
b/src/config.c
index
979603c
..
fd334ef
100644
(file)
--- a/
src/config.c
+++ b/
src/config.c
@@
-621,9
+621,11
@@
int config_parse_interface(void *data, size_t len, const char *name, bool overwr
}
if ((c = tb[IFACE_ATTR_RA_MTU])) {
-
iface->
ra_mtu = blobmsg_get_u32(c);
- if (
iface->ra_mtu < 1280
)
+
uint32_t
ra_mtu = blobmsg_get_u32(c);
+ if (
ra_mtu < 1280 || ra_mtu > 65535
)
goto err;
+
+ iface->ra_mtu = ra_mtu;
}
if ((c = tb[IFACE_ATTR_RA_OFFLINK]))