Refresh timers only when a valid DHCPv6 msg-type has been received
in the received DHCPv6 reconfigure
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
{
uint16_t otype, olen;
uint8_t *odata;
{
uint16_t otype, olen;
uint8_t *odata;
+ enum dhcpv6_msg msg = DHCPV6_MSG_UNKNOWN;
dhcpv6_for_each_option(opt, end, otype, olen, odata) {
if (otype == DHCPV6_OPT_RECONF_MESSAGE && olen == 1) {
dhcpv6_for_each_option(opt, end, otype, olen, odata) {
if (otype == DHCPV6_OPT_RECONF_MESSAGE && olen == 1) {
- dhcpv6_handle_reply(orig, rc, NULL, NULL, NULL);
+ if (msg != DHCPV6_MSG_UNKNOWN)
+ dhcpv6_handle_reply(orig, rc, NULL, NULL, NULL);
+ return (msg == DHCPV6_MSG_UNKNOWN? -1: 1);
}
// Collect all advertised servers
}
// Collect all advertised servers