diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2017-05-15 19:54:20 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2017-05-15 20:05:27 +0200 |
commit | 0005cb40d381a207c991abc7ea751365942c2cf5 (patch) | |
tree | 97a0d7b1f9d9e18e7e3fb248aa4ce13993b83613 | |
parent | 5683dd25da56c66e0a5c86e770b8ee2188ad569c (diff) |
config: fix invalid reachabletime in RA message
Don't send an invalid reachabletime in RA message when
the interface is shutdown due to a invalid configured
ra_reachabletime.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-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 fd334ef..2369372 100644 --- a/src/config.c +++ b/src/config.c @@ -603,9 +603,11 @@ int config_parse_interface(void *data, size_t len, const char *name, bool overwr iface->managed = blobmsg_get_u32(c); if ((c = tb[IFACE_ATTR_RA_REACHABLETIME])) { - iface->ra_reachabletime = blobmsg_get_u32(c); - if (iface->ra_reachabletime > 3600000) + uint32_t ra_reachabletime = blobmsg_get_u32(c); + if (ra_reachabletime > 3600000) goto err; + + iface->ra_reachabletime = ra_reachabletime; } if ((c = tb[IFACE_ATTR_RA_RETRANSTIME])) { |