From: Hans Dedecker Date: Sat, 18 Mar 2017 17:00:03 +0000 (+0100) Subject: dhcpv6: don't return renew msg in case of invalid msg type in reconfigure msg X-Git-Url: http://git.openwrt.org/?p=project%2Fodhcp6c.git;a=commitdiff_plain;h=89822de45f02f3cf7afcbeed64abe62934164199 dhcpv6: don't return renew msg in case of invalid msg type in reconfigure msg Return -1 in case the msg type in the reconfigure message is invalid and as such don't start sending renew messages. Signed-off-by: Hans Dedecker --- diff --git a/src/dhcpv6.c b/src/dhcpv6.c index 71e1cc2..17b5150 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -801,7 +801,8 @@ static int dhcpv6_handle_reconfigure(_unused enum dhcpv6_msg orig, const int rc, const void *opt, const void *end, _unused const struct sockaddr_in6 *from) { uint16_t otype, olen; - uint8_t *odata, msg = DHCPV6_MSG_RENEW; + uint8_t *odata; + int msg = -1; dhcpv6_for_each_option(opt, end, otype, olen, odata) { if (otype == DHCPV6_OPT_RECONF_MESSAGE && olen == 1 && (