From: Hans Dedecker Date: Mon, 15 May 2017 17:59:03 +0000 (+0200) Subject: config: fix invalid retranstime in RA message X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fodhcpd.git;a=commitdiff_plain;h=2ae08d1fe4cd1e8bda92c2ce33438e400ad5ffa4 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 --- 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])) {