From e23448ff8edc66f1da4fcb2b4066a02d6a54306f Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 17 Oct 2013 09:19:01 +0200 Subject: [PATCH] Fix handling of PD-Advertisements --- src/dhcpv6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- 2.39.5