From: Markus Stenberg Date: Tue, 26 Mar 2013 14:45:05 +0000 (+0200) Subject: Fixed prefix class finding - it was starting from wrong offset. Now works. X-Git-Tag: debian/1.1+git20160131-1~133^2~4 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=odhcp6c.git;a=commitdiff_plain;h=78db615ec88b899b047a0f47eb74e9ef0ff5a7fe Fixed prefix class finding - it was starting from wrong offset. Now works. --- diff --git a/src/dhcpv6.c b/src/dhcpv6.c index 7e62a2b..161f628 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -752,7 +752,7 @@ static uint32_t dhcpv6_parse_ia(void *opt, void *end) uint8_t *sdata; // Find prefix class, if any - dhcpv6_for_each_option(odata, odata + olen, + dhcpv6_for_each_option(&prefix[1], odata + olen, stype, slen, sdata) if (stype == DHCPV6_OPT_PREFIX_CLASS && slen == 2) entry.prefix_class = ntohs(*((uint16_t*)sdata));