Check if a valid DHCPv6 message is returned by dhcpv6_request in
dhcpv6_poll_reconfigure as only RENEW/REBIND/INFORMATION REQUEST
messages can trigger the transmission of these messages in reply
to a RECONFIGURE
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
{
int ret = dhcpv6_request(DHCPV6_MSG_UNKNOWN);
- if (ret != -1)
+ switch (ret) {
+ /*
+ * Only RENEW/REBIND/INFORMATION REQUEST
+ * messaage transmission can be requested
+ * by a RECONFIGURE
+ */
+ case DHCPV6_MSG_RENEW:
+ case DHCPV6_MSG_REBIND:
+ case DHCPV6_MSG_INFO_REQ:
ret = dhcpv6_request(ret);
+ break;
+
+ default:
+ break;
+ }
return ret;
}