X-Git-Url: https://git.decadent.org.uk/gitweb/?p=odhcp6c.git;a=blobdiff_plain;f=src%2Fdhcpv6.c;h=f905a7836d2ba601d5b98c5a10d72e77bd53da34;hp=05794c6e570c58740627a5c4351fa6bab3060e57;hb=e1b11c518aded9136b4f44759c6e2a6be4161ee9;hpb=2037bd1f310239f1982f3bd2f541ba409ee16b6a diff --git a/src/dhcpv6.c b/src/dhcpv6.c index 05794c6..f905a78 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -599,7 +599,7 @@ static int dhcpv6_handle_advert(enum dhcpv6_msg orig, dhcpv6_for_each_option(&h[1], oend, otype, olen, d) { if (otype == DHCPV6_OPT_IA_PREFIX && (olen + 4) >= (uint16_t)sizeof(struct dhcpv6_ia_prefix)) { - struct dhcpv6_ia_prefix *p = (struct dhcpv6_ia_prefix*)&odata[-4]; + struct dhcpv6_ia_prefix *p = (struct dhcpv6_ia_prefix*)&d[-4]; have_pd = p->prefix; } }