X-Git-Url: https://git.decadent.org.uk/gitweb/?p=odhcp6c.git;a=blobdiff_plain;f=src%2Fdhcpv6.c;h=b7fccaca62e78e9a048b8da5151677523ef69dcd;hp=df6e1206b87eb35d11d814be26e83fe785d0d09e;hb=0300fe7589a1701361735ac068e4b57bb1a1896f;hpb=b38d8871977d3b97cc3c3e7f2ad203852166c661 diff --git a/src/dhcpv6.c b/src/dhcpv6.c index df6e120..b7fccac 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -179,11 +179,9 @@ int init_dhcpv6(const char *ifname, unsigned int options, int sol_timeout) #ifdef EXT_CER_ID htons(DHCPV6_OPT_CER_ID), #endif -#ifdef EXT_S46 htons(DHCPV6_OPT_S46_CONT_MAPE), htons(DHCPV6_OPT_S46_CONT_MAPT), htons(DHCPV6_OPT_S46_CONT_LW), -#endif }; odhcp6c_add_state(STATE_ORO, oro, sizeof(oro)); } @@ -366,7 +364,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]; @@ -934,7 +932,7 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, struct dhcpv6_ia_hdr *ia_hdr = (void*)(&odata[-4]); // Test ID - if (ia_hdr->iaid != 1 && otype == DHCPV6_OPT_IA_NA) + if (ia_hdr->iaid != htonl(1) && otype == DHCPV6_OPT_IA_NA) continue; uint16_t code = DHCPV6_Success; @@ -1041,7 +1039,6 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, odhcp6c_add_state(STATE_CER, &cer_id->addr, sizeof(any)); passthru = false; #endif -#ifdef EXT_S46 } else if (otype == DHCPV6_OPT_S46_CONT_MAPT) { odhcp6c_add_state(STATE_S46_MAPT, odata, olen); passthru = false; @@ -1054,13 +1051,13 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, } else if (otype == DHCPV6_OPT_S46_CONT_LW) { odhcp6c_add_state(STATE_S46_LW, odata, olen); passthru = false; -#endif } else if (otype == DHCPV6_OPT_CLIENTID || otype == DHCPV6_OPT_SERVERID || 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);