dhcpv6: don't return renew msg in case of invalid msg type in reconfigure msg
[project/odhcp6c.git] / src / dhcpv6.c
index 71e1cc248a8bc966a34c111b22595b505ec62aec..17b515083dbaec9635c4e8657e9b0f53e9f0a3db 100644 (file)
@@ -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 && (