]> git.decadent.org.uk Git - odhcp6c.git/blobdiff - src/dhcpv6.c
ia_na: use big-endian 1 as IAID
[odhcp6c.git] / src / dhcpv6.c
index 4fbff843459b0614ecc0c840bff2781261a44bd4..e52fd6cd95fcf5dc4aa47febb023cb12e00b8eca 100644 (file)
@@ -366,7 +366,7 @@ static void dhcpv6_send(enum dhcpv6_msg type, uint8_t trid[3], uint32_t ecs)
        struct dhcpv6_ia_hdr hdr_ia_na = {
                htons(DHCPV6_OPT_IA_NA),
                htons(sizeof(hdr_ia_na) - 4),
-               1, 0, 0
+               htonl(1), 0, 0
        };
 
        struct dhcpv6_ia_addr pa[ia_na_entries];
@@ -980,6 +980,7 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc,
                                odhcp6c_add_state(STATE_DNS, odata, olen);
                } else if (otype == DHCPV6_OPT_DNS_DOMAIN) {
                        odhcp6c_add_state(STATE_SEARCH, odata, olen);
+                       passthru = false;
                } else if (otype == DHCPV6_OPT_SNTP_SERVERS) {
                        if (olen % 16 == 0)
                                odhcp6c_add_state(STATE_SNTP_IP, odata, olen);
@@ -1059,7 +1060,8 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc,
                                otype == DHCPV6_OPT_IA_TA ||
                                otype == DHCPV6_OPT_PREF ||
                                otype == DHCPV6_OPT_UNICAST ||
-                               otype == DHCPV6_OPT_FQDN) {
+                               otype == DHCPV6_OPT_FQDN ||
+                               otype == DHCPV6_OPT_RECONF_ACCEPT) {
                        passthru = false;
                } else {
                        odhcp6c_add_state(STATE_CUSTOM_OPTS, &odata[-4], olen + 4);