From dcb29c591fdac0f073c4206e60e1fb94a577e0b8 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 --- 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 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. */