diff --git a/src/core/ipv6/nd6.c b/src/core/ipv6/nd6.c index 75899c65..da7a708f 100644 --- a/src/core/ipv6/nd6.c +++ b/src/core/ipv6/nd6.c @@ -766,7 +766,7 @@ nd6_input(struct pbuf *p, struct netif *inp) rdnss_opt = (struct rdnss_option *)buffer; num = (rdnss_opt->length - 1) / 2; - for (n = 0; (rdnss_server_idx < DNS_MAX_SERVERS) && (n < num); n++) { + for (n = 0; (rdnss_server_idx < DNS_MAX_SERVERS) && (n < num); n++, copy_offset += sizeof(ip6_addr_p_t)) { ip_addr_t rdnss_address; /* Copy directly from pbuf to get an aligned, zoned copy of the prefix. */