From 2ae08d1fe4cd1e8bda92c2ce33438e400ad5ffa4 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Mon, 15 May 2017 19:59:03 +0200 Subject: 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 --- src/config.c | 6 ++++-- 1 file 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])) { -- cgit v1.2.3