X-Git-Url: http://git.openwrt.org/?p=project%2Fodhcp6c.git;a=blobdiff_plain;f=src%2Fdhcpv6.c;h=000d9993d6a991e0d98b33944522e4a71d3fd776;hp=6ae6f7a02fd8d9040fc8b676cd81a73d361d21c6;hb=b5afadae8ed69c98f4e9e6a33dfaf570c5bd9b51;hpb=c3bbeced0f204b6b9571148ae84227105baaf179 diff --git a/src/dhcpv6.c b/src/dhcpv6.c index 6ae6f7a..000d999 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -173,9 +173,6 @@ int init_dhcpv6(const char *ifname, unsigned int options, int sol_timeout) htons(DHCPV6_OPT_PD_EXCLUDE), htons(DHCPV6_OPT_SOL_MAX_RT), htons(DHCPV6_OPT_INF_MAX_RT), -#ifdef EXT_PREFIX_CLASS - htons(DHCPV6_OPT_PREFIX_CLASS), -#endif #ifdef EXT_CER_ID htons(DHCPV6_OPT_CER_ID), #endif @@ -1146,7 +1143,7 @@ static int dhcpv6_parse_ia(void *opt, void *end) // Update address IA dhcpv6_for_each_option(&ia_hdr[1], end, otype, olen, odata) { struct odhcp6c_entry entry = {IN6ADDR_ANY_INIT, 0, 0, - IN6ADDR_ANY_INIT, 0, 0, 0, 0, 0, 0}; + IN6ADDR_ANY_INIT, 0, 0, 0, 0, 0}; entry.iaid = ia_hdr->iaid; @@ -1171,14 +1168,6 @@ static int dhcpv6_parse_ia(void *opt, void *end) uint16_t stype, slen; uint8_t *sdata; -#ifdef EXT_PREFIX_CLASS - // Find prefix class, if any - dhcpv6_for_each_option(&prefix[1], odata + olen, - stype, slen, sdata) - if (stype == DHCPV6_OPT_PREFIX_CLASS && slen == 2) - entry.class = sdata[0] << 8 | sdata[1]; -#endif - // Parse PD-exclude bool ok = true; dhcpv6_for_each_option(odata + sizeof(*prefix) - 4U, @@ -1242,16 +1231,6 @@ static int dhcpv6_parse_ia(void *opt, void *end) entry.length = 128; entry.target = addr->addr; -#ifdef EXT_PREFIX_CLASS - uint16_t stype, slen; - uint8_t *sdata; - // Find prefix class, if any - dhcpv6_for_each_option(&addr[1], odata + olen, - stype, slen, sdata) - if (stype == DHCPV6_OPT_PREFIX_CLASS && slen == 2) - entry.class = sdata[0] << 8 | sdata[1]; -#endif - odhcp6c_update_entry(STATE_IA_NA, &entry, 0, false); parsed_ia++; }