From 5cc46d7989fe3c61b15c4f15988c2e1a802acf6b Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Wed, 5 Dec 2018 19:56:48 +0100 Subject: [PATCH] nd6: fix copying more than one DNS server See bug #55163 (cherry picked from commit dcb29c591fdac0f073c4206e60e1fb94a577e0b8) --- src/core/ipv6/nd6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ipv6/nd6.c b/src/core/ipv6/nd6.c index db0c132e..039b7963 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. */