From b5afadae8ed69c98f4e9e6a33dfaf570c5bd9b51 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sun, 12 Apr 2015 09:15:22 +0200 Subject: Remove obsolete prefix class support Signed-off-by: Steven Barth --- src/dhcpv6.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'src/dhcpv6.c') 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++; } -- cgit v1.2.1