X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=src%2Fdhcpv6.c;h=6ae6f7a02fd8d9040fc8b676cd81a73d361d21c6;hb=ec864c44e9959a5d65cc564182f4e960e47c6e9e;hp=5cda153bcdd5dcec3dd8bb4ea709fac62e418d18;hpb=46ba6f6aeb8055e872c57dc2b90a383fb280f440;p=odhcp6c.git diff --git a/src/dhcpv6.c b/src/dhcpv6.c index 5cda153..6ae6f7a 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -885,7 +885,7 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, { uint8_t *odata; uint16_t otype, olen; - uint32_t refresh = UINT32_MAX; + uint32_t refresh = 86400; int ret = 1; bool handled_status_codes[_DHCPV6_Status_Max] = { false, }; @@ -947,6 +947,10 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, && olen > -4 + sizeof(struct dhcpv6_ia_hdr)) { struct dhcpv6_ia_hdr *ia_hdr = (void*)(&odata[-4]); + if ((na_mode == IA_MODE_NONE && otype == DHCPV6_OPT_IA_NA) || + (pd_mode == IA_MODE_NONE && otype == DHCPV6_OPT_IA_PD)) + continue; + // Test ID if (ia_hdr->iaid != htonl(1) && otype == DHCPV6_OPT_IA_NA) continue;