summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2017-05-15 15:58:46 +0200
committerHans Dedecker <dedeckeh@gmail.com>2017-05-15 16:01:28 +0200
commitf8f4b8769fbbd4fd52d2854c912b5d298ff8f8fb (patch)
treeb8affc6e4ec4f9fa2d10aebe91781d975bcd851f /src
parenta2d8bf66186df66b6e2b645e59c23f8ae2be49c4 (diff)
config: limit ra_retranstime to 60000
Limit the maximum ra_retranstime value to 60000 milliseconds as described in RFC7048. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/config.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index 9348985..979603c 100644
--- a/src/config.c
+++ b/src/config.c
@@ -608,8 +608,11 @@ int config_parse_interface(void *data, size_t len, const char *name, bool overwr
goto err;
}
- if ((c = tb[IFACE_ATTR_RA_RETRANSTIME]))
+ if ((c = tb[IFACE_ATTR_RA_RETRANSTIME])) {
iface->ra_retranstime = blobmsg_get_u32(c);
+ if (iface->ra_retranstime > 60000)
+ goto err;
+ }
if ((c = tb[IFACE_ATTR_RA_HOPLIMIT])) {
iface->ra_hoplimit = blobmsg_get_u32(c);