diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2017-05-15 19:59:03 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2017-05-15 20:05:55 +0200 |
commit | 2ae08d1fe4cd1e8bda92c2ce33438e400ad5ffa4 (patch) | |
tree | 56a01562a3d726215bbcbb2a3bfb7b54cc493b63 /src/config.c | |
parent | 0005cb40d381a207c991abc7ea751365942c2cf5 (diff) |
config: fix invalid retranstime in RA message
Don't send an invalid retranstime in RA message when
the interface is shutdown due to a invalid configured
ra_retranstime.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c index 2369372..9b4fa46 100644 --- a/src/config.c +++ b/src/config.c @@ -611,9 +611,11 @@ int config_parse_interface(void *data, size_t len, const char *name, bool overwr } if ((c = tb[IFACE_ATTR_RA_RETRANSTIME])) { - iface->ra_retranstime = blobmsg_get_u32(c); - if (iface->ra_retranstime > 60000) + uint32_t ra_retranstime = blobmsg_get_u32(c); + if (ra_retranstime > 60000) goto err; + + iface->ra_retranstime = ra_retranstime; } if ((c = tb[IFACE_ATTR_RA_HOPLIMIT])) { |