From 89822de45f02f3cf7afcbeed64abe62934164199 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Sat, 18 Mar 2017 18:00:03 +0100 Subject: [PATCH] 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 --- src/dhcpv6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 && ( -- 2.25.1